#!/usr/bin/ruby
# -*- coding: utf-8 -*-
while (s = gets)
  latch = false
  loop = 0
  s.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
  }
end