object Main extends App {
    val r = """@(\d)(\w)""".r
    io.Source.stdin.getLines.foreach(s => println {
        r.replaceAllIn(s, _ match {
            case r(n, c) => c * n.toInt
        })
    })
}