#!/usr/bin/ruby
# -*- coding: utf-8 -*-

latch = false
loop = 0
gets.each_char {|c|
  if latch && loop == 0
    loop = c.to_i
  elsif latch
    loop.times { 
      print c 
    }
    latch = false
    loop = 0
  elsif c == '@'
    latch = true
  else
    print c
  end
}