while line = gets
    line = line.chomp
    atmark, multi = 0, 0
    line.each_char{|c|
        if c == '@'
            atmark = 1
        else
            if atmark == 0
                print c
            elsif atmark == 1
                multi = c.to_i
                atmark = 2
            else
                print c * multi
                atmark = 0
            end
        end
    }
    puts
end

