import java.util.*;
public class Menu1 {
public static void main(String[] args) {
System.out.println("Main: Menu");
boolean flag = true;
int x = 0;
while (flag)
{
Scanner stdin = new Scanner(System.in);
try {
System.out.print("Enter X: ");
x = stdin.nextInt();
}
catch (Exception e) {
System.out.println("Exception");
x = 0;
}
if (x == 1) {
System.out.print("One: ");
}
else if (x == 2) {
System.out.print("Two: ");
}
else if (x == 3) {
System.out.print("Three: ");
}
else if (x == 4) {
System.out.println("Four");
flag = false;
}
else {
System.out.println("Error");
}
} // end while
} // end main
} // end Menu