patmap = {(0, 0, 0): ('pat03.ppm', (0, 120, 24, 24)), (1, 0, 0): ('pat01.ppm', (0, 24, 24, 24)), (2, 0, 0): ('pat09.ppm', (0, 0, 24, 24)), (2, 'l'): ('pat14.ppm', (0, 160, 40, 32)), (3, 0, 0): ('pat06.ppm', (0, 120, 24, 24)), (3, 'l'): ('pat17.ppm', (0, 32, 40, 32)), (4, 0, 0): ('pat04.ppm', (0, 48, 24, 24)), (4, 'l'): ('pat15.ppm', (0, 192, 40, 32)), (5, 0, 0): ('pat01.ppm', (0, 216, 24, 24)), (5, 'l'): ('pat19.ppm', (0, 96, 40, 32)), (6, 0, 0): ('pat09.ppm', (0, 144, 24, 24)), (6, 'l'): ('pat18.ppm', (0, 96, 40, 32)), (7, 0, 0): ('pat07.ppm', (0, 24, 24, 24)), (8, 0, 0): ('pat02.ppm', (0, 48, 24, 24)), (9, 0, 0): ('pat09.ppm', (0, 216, 24, 24)), (9, 'l'): ('pat11.ppm', (0, 64, 40, 32)), (10, 0, 0): ('pat07.ppm', (0, 96, 24, 24)), (10, 'l'): ('pat14.ppm', (0, 96, 40, 32)), (11, 0, 0): ('pat05.ppm', (0, 24, 24, 24)), (11, 'l'): ('pat13.ppm', (0, 32, 40, 32)), (12, 0, 0): ('pat02.ppm', (0, 216, 24, 24)), (12, 'l'): ('pat18.ppm', (0, 0, 40, 32)), (13, 0, 0): ('pat00.ppm', (0, 72, 24, 24)), (13, 'l'): ('pat18.ppm', (0, 128, 40, 32)), (14, 0, 0): ('pat07.ppm', (0, 192, 24, 24)), (15, 0, 0): ('pat05.ppm', (0, 192, 24, 24)), (15, 'l'): ('pat18.ppm', (0, 32, 40, 32)), (16, 0, 0): ('pat06.ppm', (0, 96, 24, 24)), (16, 'l'): ('pat11.ppm', (0, 32, 40, 32)), (17, 0, 0): ('pat04.ppm', (0, 0, 24, 24)), (17, 'l'): ('pat14.ppm', (0, 64, 40, 32)), (18, 0, 0): ('pat01.ppm', (0, 168, 24, 24)), (18, 'l'): ('pat13.ppm', (0, 0, 40, 32)), (19, 0, 0): ('pat09.ppm', (0, 96, 24, 24)), (19, 'l'): ('pat16.ppm', (0, 192, 40, 32)), (20, 0, 0): ('pat07.ppm', (0, 0, 24, 24)), (20, 'l'): ('pat15.ppm', (0, 160, 40, 32)), (21, 0, 0): ('pat04.ppm', (0, 192, 24, 24)), (21, 'l'): ('pat19.ppm', (0, 64, 40, 32)), (22, 0, 0): ('pat02.ppm', (0, 120, 24, 24)), (22, 'l'): ('pat17.ppm', (0, 224, 40, 32)), (23, 0, 0): ('pat10.ppm', (0, 24, 24, 24)), (23, 'l'): ('pat12.ppm', (0, 64, 40, 32)), (24, 0, 0): ('pat05.ppm', (0, 0, 24, 24)), (24, 'l'): ('pat17.ppm', (0, 96, 40, 32)), (25, 0, 0): ('pat02.ppm', (0, 168, 24, 24)), (25, 'l'): ('pat15.ppm', (0, 64, 40, 32)), (26, 0, 0): ('pat00.ppm', (0, 24, 24, 24)), (26, 0, 1): ('pat00.ppm', (0, 0, 24, 24)), (26, 1, 0): ('pat01.ppm', (0, 120, 24, 24)), (26, 1, 1): ('pat08.ppm', (0, 144, 24, 24)), (26, 'l'): ('pat13.ppm', (0, 224, 40, 32)), (27, 0, 0): ('pat07.ppm', (0, 216, 24, 24)), (27, 'l'): ('pat17.ppm', (0, 64, 40, 32)), (28, 0, 0): ('pat05.ppm', (0, 168, 24, 24)), (28, 'l'): ('pat15.ppm', (0, 224, 40, 32)), (29, 0, 0): ('pat03.ppm', (0, 72, 24, 24)), (30, 0, 0): ('pat00.ppm', (0, 216, 24, 24)), (30, 'l'): ('pat17.ppm', (0, 160, 40, 32)), (31, 0, 0): ('pat08.ppm', (0, 168, 24, 24)), (31, 'l'): ('pat12.ppm', (0, 32, 40, 32)), (32, 0, 0): ('pat08.ppm', (0, 0, 24, 24)), (33, 0, 0): ('pat05.ppm', (0, 144, 24, 24)), (33, 'l'): ('pat12.ppm', (0, 192, 40, 32)), (34, 0, 0): ('pat03.ppm', (0, 48, 24, 24)), (35, 0, 0): ('pat00.ppm', (0, 168, 24, 24)), (35, 'l'): ('pat14.ppm', (0, 128, 40, 32)), (36, 0, 0): ('pat07.ppm', (0, 120, 24, 24)), (36, 'l'): ('pat16.ppm', (0, 96, 40, 32)), (37, 0, 0): ('pat06.ppm', (0, 72, 24, 24)), (38, 0, 0): ('pat03.ppm', (0, 216, 24, 24)), (38, 'l'): ('pat11.ppm', (0, 128, 40, 32)), (39, 0, 0): ('pat01.ppm', (0, 96, 24, 24)), (40, 0, 0): ('pat08.ppm', (0, 48, 24, 24)), (41, 0, 0): ('pat04.ppm', (0, 24, 24, 24)), (41, 'l'): ('pat12.ppm', (0, 160, 40, 32)), (42, 0, 0): ('pat01.ppm', (0, 192, 24, 24)), (43, 0, 0): ('pat05.ppm', (0, 120, 24, 24)), (43, 1, 0): ('pat08.ppm', (0, 72, 24, 24)), (44, 0, 0): ('pat07.ppm', (0, 48, 24, 24)), (45, 0, 0): ('pat04.ppm', (0, 216, 24, 24)), (45, 'l'): ('pat16.ppm', (0, 224, 40, 32)), (46, 0, 0): ('pat02.ppm', (0, 144, 24, 24)), (46, 'l'): ('pat16.ppm', (0, 64, 40, 32)), (47, 0, 0): ('pat10.ppm', (0, 72, 24, 24)), (47, 'l'): ('pat19.ppm', (0, 224, 40, 32)), (48, 0, 0): ('pat00.ppm', (0, 120, 24, 24)), (48, 'l'): ('pat12.ppm', (0, 128, 40, 32)), (49, 0, 0): ('pat08.ppm', (0, 96, 24, 24)), (49, 'l'): ('pat11.ppm', (0, 192, 40, 32)), (50, 0, 0): ('pat06.ppm', (0, 24, 24, 24)), (50, 'l'): ('pat16.ppm', (0, 128, 40, 32)), (51, 0, 0): ('pat03.ppm', (0, 144, 24, 24)), (51, 'l'): ('pat14.ppm', (0, 0, 40, 32)), (52, 0, 0): ('pat01.ppm', (0, 72, 24, 24)), (52, 'l'): ('pat15.ppm', (0, 0, 40, 32)), (53, 0, 0): ('pat09.ppm', (0, 48, 24, 24)), (53, 'l'): ('pat16.ppm', (0, 32, 40, 32)), (54, 0, 0): ('pat06.ppm', (0, 192, 24, 24)), (54, 'l'): ('pat19.ppm', (0, 192, 40, 32)), (55, 0, 0): ('pat04.ppm', (0, 96, 24, 24)), (55, 'l'): ('pat18.ppm', (0, 160, 40, 32)), (56, 0, 0): ('pat09.ppm', (0, 120, 24, 24)), (56, 'l'): ('pat18.ppm', (0, 64, 40, 32)), (57, 0, 0): ('pat00.ppm', (0, 144, 24, 24)), (57, 'l'): ('pat12.ppm', (0, 96, 40, 32)), (58, 0, 0): ('pat04.ppm', (0, 168, 24, 24)), (59, 0, 0): ('pat02.ppm', (0, 72, 24, 24)), (59, 'l'): ('pat14.ppm', (0, 192, 40, 32)), (60, 0, 0): ('pat10.ppm', (0, 48, 24, 24)), (60, 'l'): ('pat13.ppm', (0, 96, 40, 64)), (61, 0, 0): ('pat07.ppm', (0, 168, 24, 24)), (62, 0, 0): ('pat05.ppm', (0, 96, 24, 24)), (62, 'l'): ('pat19.ppm', (0, 128, 40, 32)), (63, 0, 0): ('pat03.ppm', (0, 0, 24, 24)), (63, 'l'): ('pat20.ppm', (0, 0, 40, 32)), (64, 0, 0): ('pat02.ppm', (0, 96, 24, 24)), (64, 'l'): ('pat13.ppm', (0, 64, 40, 32)), (65, 0, 0): ('pat10.ppm', (0, 0, 24, 24)), (65, 'l'): ('pat19.ppm', (0, 32, 40, 32)), (66, 0, 0): ('pat07.ppm', (0, 144, 24, 24)), (66, 'l'): ('pat17.ppm', (0, 192, 40, 32)), (67, 0, 0): ('pat05.ppm', (0, 72, 24, 24)), (67, 'l'): ('pat11.ppm', (0, 224, 40, 32)), (68, 0, 0): ('pat03.ppm', (0, 24, 24, 24)), (68, 'l'): ('pat15.ppm', (0, 32, 40, 32)), (69, 0, 0): ('pat00.ppm', (0, 96, 24, 24)), (69, 'l'): ('pat13.ppm', (0, 192, 40, 32)), (70, 0, 0): ('pat08.ppm', (0, 192, 24, 24)), (70, 'l'): ('pat17.ppm', (0, 0, 40, 32)), (71, 0, 0): ('pat06.ppm', (0, 0, 24, 24)), (72, 0, 0): ('pat00.ppm', (0, 192, 24, 24)), (72, 'l'): ('pat15.ppm', (0, 128, 40, 32)), (73, 0, 0): ('pat08.ppm', (0, 120, 24, 24)), (74, 0, 0): ('pat06.ppm', (0, 48, 24, 24)), (75, 0, 0): ('pat03.ppm', (0, 192, 24, 24)), (76, 0, 0): ('pat01.ppm', (0, 144, 24, 24)), (76, 'l'): ('pat11.ppm', (0, 0, 40, 32)), (77, 0, 0): ('pat09.ppm', (0, 72, 24, 24)), (77, 'l'): ('pat14.ppm', (0, 32, 40, 32)), (78, 0, 0): ('pat06.ppm', (0, 216, 24, 24)), (78, 'l'): ('pat13.ppm', (0, 160, 40, 32)), (79, 0, 0): ('pat04.ppm', (0, 144, 24, 24)), (79, 'l'): ('pat16.ppm', (0, 160, 40, 32)), (80, 0, 0): ('pat05.ppm', (0, 48, 24, 24)), (81, 0, 0): ('pat02.ppm', (0, 192, 24, 24)), (81, 'l'): ('pat17.ppm', (0, 128, 40, 32)), (82, 0, 0): ('pat00.ppm', (0, 48, 24, 24)), (82, 'l'): ('pat12.ppm', (0, 0, 40, 32)), (83, 0, 0): ('pat08.ppm', (0, 24, 24, 24)), (83, 'l'): ('pat11.ppm', (0, 96, 40, 32)), (84, 0, 0): ('pat05.ppm', (0, 216, 24, 24)), (84, 'l'): ('pat14.ppm', (0, 224, 40, 32)), (84, 'r'): ('pat18.ppm', (0, 224, 40, 32)), (85, 0, 0): ('pat03.ppm', (0, 96, 24, 24)), (86, 0, 0): ('pat01.ppm', (0, 0, 24, 24)), (87, 0, 0): ('pat08.ppm', (0, 216, 24, 24)), (88, 0, 0): ('pat03.ppm', (0, 168, 24, 24)), (88, 'l'): ('pat20.ppm', (0, 32, 40, 32)), (89, 0, 0): ('pat01.ppm', (0, 48, 24, 24)), (90, 0, 0): ('pat09.ppm', (0, 24, 24, 24)), (90, 'l'): ('pat12.ppm', (0, 224, 40, 32)), (91, 0, 0): ('pat06.ppm', (0, 144, 24, 24)), (92, 0, 0): ('pat04.ppm', (0, 120, 24, 24)), (92, 'l'): ('pat18.ppm', (0, 192, 40, 32)), (93, 0, 0): ('pat02.ppm', (0, 24, 24, 24)), (93, 'l'): ('pat11.ppm', (0, 160, 40, 32)), (94, 0, 0): ('pat09.ppm', (0, 192, 24, 24)), (94, 'l'): ('pat19.ppm', (0, 0, 40, 32)), (95, 0, 0): ('pat07.ppm', (0, 72, 24, 24)), (95, 'l'): ('pat15.ppm', (0, 96, 40, 32)), (96, 0, 0): ('pat06.ppm', (0, 168, 24, 24)), (97, 0, 0): ('pat04.ppm', (0, 72, 24, 24)), (97, 'l'): ('pat16.ppm', (0, 0, 40, 32)), (98, 0, 0): ('pat02.ppm', (0, 0, 24, 24)), (98, 'l'): ('pat19.ppm', (0, 160, 40, 32)), (99, 0, 0): ('pat09.ppm', (0, 168, 24, 24))}