public class Test {
public static void main(String[] args) throws Exception {
Scanner scanner = new Scanner(System.in);
int count = 0;
while(true) {
count += 1;
if (scanner.hasNext()) {
String next = scanner.nextLine();
System.out.println(count + ":" + next);
if ("exit".equals(next)) {
System.out.println("你已退出!");
break;
}
}
}
scanner.close();
}
}