import java.io.*; import java.util.*; import java.util.List; import java.awt.*; public class Main { static Point size; static Point robot; static String robotHeading; static String robotCommands; static List robotsLost; public static void main(String[] args) { BufferedReader stdIn = new BufferedReader(new InputStreamReader(System.in)); String s; try { s = stdIn.readLine(); Scanner sc = new Scanner(s); size.x = sc.nextInt(); size.y = sc.nextInt(); System.out.printf("size %d %d\n", size.x, size.y); robotsLost = new ArrayList(); while ((s = stdIn.readLine()) != null) { Scanner sc1 = new Scanner(s); robot.x = sc1.nextInt(); robot.y = sc1.nextInt(); robotHeading = sc1.next(); robotCommands = stdIn.readLine(); System.out.printf("robot position %d %d %s\n", robot.x, robot.y, robotHeading); System.out.printf("commands %s\n", robotCommands); } } catch (IOException e) { e.printStackTrace(); } } }