#!/usr/bin/perl -w
use strict;
use warnings;
while (defined (my $line = <STDIN>)) {
    my ($count, $rest) = $line =~ m{\A\s*(\d+)\s(.*)\z}s;
    if (!defined $count) {
        die "malformed uniqc line $.: $line\n";
    }
    for (1..$count) {
        print $rest;
    }
}
