import math._ object Main { def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) var s = "locked" var n = 0 while (s == "locked") { printf("%03d\n", n) s = sc.next n += 1 } } }