div_a = [
    [1, 'Watermelon', '4', 'A'] ,
    [2, 'Way Too Long Words', '71', 'A'] ,
    [3, 'String Task', '118', 'A'] ,
    [4, 'Petya and Strings', '112', 'A'] ,
    [5, 'Helpful Maths', '339', 'A'] ,
    [6, 'Twins', '160', 'A'] ,
    [7, 'Chat room', '58', 'A'] ,
    [8, 'Lucky Division', '122', 'A'] ,
    [9, 'Presents', '136', 'A'] ,
    [10, 'Beautiful Matrix', '263', 'A'] ,
    [11, 'Arrival of the General', '144', 'A'] ,
    [12, 'Game With Sticks', '451', 'A'] ,
    [13, 'Games', '268', 'A'] ,
    [14, 'Dubstep', '208', 'A'] ,
    [15, 'Young Physicist', '69', 'A'] ,
    [16, 'Puzzles', '337', 'A'] ,
    [17, 'Expression', '479', 'A'] ,
    [18, 'Anton and Letters', '443', 'A'] ,
    [19, 'I Wanna Be the Guy', '469', 'A'] ,
    [20, 'Even Odds', '318', 'A'] ,
    [21, 'Cheap Travel', '466', 'A'] ,
    [22, 'Ilya and Bank Account', '313', 'A'] ,
    [23, 'Pashmak and Garden', '459', 'A'] ,
    [24, 'Dragons', '230', 'A'] ,
    [25, 'Dreamoon and Stairs', '476', 'A'] ,
    [26, 'Team Olympiad', '490', 'A'] ,
    [27, 'Devu, the Singer and Churu, the Joker', '439', 'A'] ,
    [28, 'Fox And Snake', '510', 'A'] ,
    [29, 'IQ test', '25', 'A'] ,
    [30, 'Choosing Teams', '432', 'A'] ,
    [31, 'Cakeminator', '330', 'A'] ,
    [32, 'Valera and Antique Items', '441', 'A'] ,
    [33, 'Appleman and Easy Task', '462', 'A'] ,
    [34, 'Bear and Raspberry', '385', 'A'] ,
    [35, 'Lunch Rush', '276', 'A'] ,
    [36, 'Laptops', '456', 'A'] ,
    [37, 'Soft Drinking', '151', 'A'] ,
    [38, 'Playing with Dice', '378', 'A'] ,
    [39, 'Minimum Difficulty', '496', 'A'] ,
    [40, "Greg's Workout", '255', 'A'] ,
    [41, 'Counterexample ', '483', 'A'] ,
    [42, 'Valera and X', '404', 'A'] ,
    [43, 'Perfect Permutation', '233', 'A'] ,
    [44, 'Watching a movie', '499', 'A'] ,
    [45, 'Supercentral Point', '165', 'A'] ,
    [46, 'Roma and Lucky Numbers', '262', 'A'] ,
    [47, 'Contest', '501', 'A'] ,
    [48, 'Cut Ribbon', '189', 'A'] ,
    [49, 'TL', '350', 'A'] ,
    [50, 'Marks', '152', 'A'] ,
    [51, 'Colorful Stones (Simplified Edition)', '265', 'A'] ,
    [52, 'Domino', '353', 'A'] ,
    [53, 'Cifera', '114', 'A'] ,
    [54, 'Array', '300', 'A'] ,
    [55, 'Fox and Number Game', '389', 'A'] ,
    [56, 'Giga Tower', '488', 'A'] ,
    [57, 'Parallelepiped', '224', 'A'] ,
    [58, 'DZY Loves Chessboard', '445', 'A'] ,
    [59, 'Football', '43', 'A'] ,
    [60, 'Life Without Zeros', '75', 'A'] ,
    [61, 'Yaroslav and Permutations', '296', 'A'] ,
    [62, 'Collecting Beats is Fun', '373', 'A'] ,
    [63, 'Levko and Table', '361', 'A'] ,
    [64, 'Vasya and Digital Root', '355', 'A'] ,
    [65, 'Two Bags of Potatoes', '239', 'A'] ,
    [66, 'The Child and Homework', '437', 'A'] ,
    [67, 'Soroban', '363', 'A'] ,
    [68, 'Line to Cashier', '408', 'A'] ,
    [69, 'Lever', '376', 'A'] ,
    [70, 'Table', '359', 'A'] ,
    [71, 'Eugeny and Array', '302', 'A'] ,
    [72, 'Dima and Continuous Line', '358', 'A'] ,
    [73, 'Reconnaissance 2', '34', 'A'] ,
    [74, 'Help Vasilisa the Wise 2', '143', 'A'] ,
    [75, 'Comparing Strings', '186', 'A'] ,
    [76, 'Palindromic Times', '108', 'A'] ,
    [77, 'Guess a number!', '416', 'A'] ,
    [78, 'Exams', '194', 'A'] ,
    [79, 'Card Game', '106', 'A'] ,
    [80, 'Sockets', '257', 'A'] ,
    [81, 'Snow Footprints', '298', 'A'] ,
    [82, 'Point on Spiral', '279', 'A'] ,
    [83, 'Next Test', '27', 'A'] ,
    [84, 'Rook, Bishop and King', '370', 'A'] ,
    [85, 'Sleuth', '49', 'A'] ,
    [86, 'Cows and Primitive Roots', '284', 'A'] ,
    [87, 'Funky Numbers', '192', 'A'] ,
    [88, 'Bar', '56', 'A'] ,
    [89, 'Lefthanders and Righthanders ', '234', 'A'] ,
    [90, 'Worms Evolution', '31', 'A'] ,
    [91, 'Strange Addition', '305', 'A'] ,
    [92, 'Plate Game', '197', 'A'] ,
    [93, 'Shell Game', '35', 'A'] ,
    [94, 'Chord', '88', 'A'] ,
    [95, 'Triangle', '18', 'A'] ,
    [96, 'Inna and Pink Pony', '374', 'A'] ,
    [97, 'Nineteen', '393', 'A'] ,
    [98, 'Inna and Alarm Clock', '390', 'A'] ,
    [99, "On Segment's Own Points", '397', 'A'] ,
    [100, 'Cinema', '200', 'A'] 
]

div_b = [
    [1, 'Queue at the School', '266', 'B'] ,
    [2, 'Xenia and Ringroad', '339', 'B'] ,
    [3, 'Fedor and New Game', '467', 'B'] ,
    [4, 'Random Teams', '478', 'B'] ,
    [5, 'Vanya and Lanterns', '492', 'B'] ,
    [6, 'Sort the Array', '451', 'B'] ,
    [7, 'Lecture', '499', 'B'] ,
    [8, 'T-primes', '230', 'B'] ,
    [9, 'Anton and currency you all know', '508', 'B'] ,
    [10, 'DZY Loves Strings', '447', 'B'] ,
    [11, 'Amr and Pins', '507', 'B'] ,
    [12, 'Little Pony and Sort by Shift', '454', 'B'] ,
    [13, 'Jzzhu and Sequences', '450', 'B'] ,
    [14, 'Roadside Trees (Simplified Edition)', '265', 'B'] ,
    [15, 'Find Marble', '285', 'B'] ,
    [16, 'Suffix Structures', '448', 'B'] ,
    [17, 'Little Elephant and Magic Square', '259', 'B'] ,
    [18, 'OR in Matrix', '486', 'B'] ,
    [19, 'Football Kit', '432', 'B'] ,
    [20, 'Little Girl and Game', '276', 'B'] ,
    [21, 'Petya and Staircases', '362', 'B'] ,
    [22, 'Books', '279', 'B'] ,
    [23, 'Chat Online', '469', 'B'] ,
    [24, 'Painting Pebbles', '509', 'B'] ,
    [25, 'Vasya and Wrestling', '493', 'B'] ,
    [26, 'George and Round', '387', 'B'] ,
    [27, 'The Fibonacci Segment', '365', 'B'] ,
    [28, 'Trace', '157', 'B'] ,
    [29, 'Sale', '34', 'B'] ,
    [30, 'Road Construction', '330', 'B'] ,
    [31, 'Little Pigs and Wolves', '116', 'B'] ,
    [32, 'Before an Exam', '4', 'B'] ,
    [33, 'Painting Eggs', '282', 'B'] ,
    [34, 'Lucky Substring', '122', 'B'] ,
    [35, 'Combination', '155', 'B'] ,
    [36, 'Jeff and Periods', '352', 'B'] ,
    [37, 'Unary', '133', 'B'] ,
    [38, 'Polo the Penguin and Matrix', '289', 'B'] ,
    [39, 'Dima and To-do List', '366', 'B'] ,
    [40, 'Coins', '58', 'B'] ,
    [41, 'Han Solo and Lazer Gun', '514', 'B'] ,
    [42, 'Garland', '408', 'B'] ,
    [43, 'Flag Day', '357', 'B'] ,
    [44, 'Art Union', '416', 'B'] ,
    [45, 'Lucky String', '110', 'B'] ,
    [46, 'Petya and Countryside', '66', 'B'] ,
    [47, 'Archer', '312', 'B'] ,
    [48, 'Routine Problem', '337', 'B'] ,
    [49, 'Color the Fence', '349', 'B'] ,
    [50, 'Levko and Permutation', '361', 'B'] ,
    [51, "Vasya's Calendar", '182', 'B'] ,
    [52, 'Reading', '234', 'B'] ,
    [53, 'Phone Numbers', '151', 'B'] ,
    [54, 'Permutation', '359', 'B'] ,
    [55, 'Students and Shoelaces', '129', 'B'] ,
    [56, 'Help Kingdom of Far Far Away 2', '143', 'B'] ,
    [57, 'The Child and Set', '437', 'B'] ,
    [58, 'Non-square Equation', '233', 'B'] ,
    [59, 'Special Offer! Super Price 999 Bourles!', '219', 'B'] ,
    [60, 'Little Elephant and Sorting', '205', 'B'] ,
    [61, 'Walking in the Rain', '192', 'B'] ,
    [62, 'Two Tables', '228', 'B'] ,
    [63, 'Xenia and Spies', '342', 'B'] ,
    [64, 'Lucky Numbers (easy)', '96', 'B'] ,
    [65, 'Ping-Pong (Easy Version)', '320', 'B'] ,
    [66, 'After Training', '195', 'B'] ,
    [67, 'Magic, Wizardry and Wonders', '231', 'B'] ,
    [68, 'Limit', '197', 'B'] ,
    [69, 'Ancient Prophesy', '260', 'B'] ,
    [70, 'Hometask', '214', 'B'] ,
    [71, 'Well-known Numbers', '225', 'B'] ,
    [72, "Settlers' Training", '63', 'B'] ,
    [73, 'Nearest Fraction', '281', 'B'] ,
    [74, 'Counting Rhombi', '189', 'B'] ,
    [75, 'Friends', '94', 'B'] ,
    [76, 'Undoubtedly Lucky Numbers', '244', 'B'] ,
    [77, 'Forming Teams', '216', 'B'] ,
    [78, 'Inna and Nine', '374', 'B'] ,
    [79, 'Bets', '69', 'B'] ,
    [80, 'Young Photographer', '14', 'B'] ,
    [81, 'Martian Clock', '149', 'B'] ,
    [82, 'Jury Size', '254', 'B'] ,
    [83, 'Hard Work', '61', 'B'] ,
    [84, 'Testing Pants for Sadness', '103', 'A'] ,
    [85, 'Running Student', '9', 'B'] ,
    [86, 'Tournament', '27', 'B'] ,
    [87, 'Magical Array', '83', 'A'] ,
    [88, 'Help Chef Gerasim', '99', 'B'] ,
    [89, 'Convex Shape', '275', 'B'] ,
    [90, 'Surrounded', '190', 'B'] ,
    [91, 'Spoilt Permutation', '56', 'B'] ,
    [92, 'PFAST Inc.', '114', 'B'] ,
    [93, 'Martian Dollar', '41', 'B'] ,
    [94, 'Bargaining Table', '22', 'B'] ,
    [95, 'Sysadmin Bob', '31', 'B'] ,
    [96, 'Facetook Priority Wall', '75', 'B'] ,
    [97, 'Maximal Area Quadrilateral', '340', 'B'] ,
    [98, 'Traffic Lights', '29', 'B'] ,
    [99, 'Blog Photo', '53', 'B'] ,
    [100, 'Three matrices', '393', 'B'] ,
]

div_c = [
    [1, 'Given Length and Sum of Digits...', '489', 'C'] ,
    [2, 'Number of Ways', '466', 'C'] ,
    [3, 'Team', '401', 'C'] ,
    [4, 'Exams', '479', 'C'] ,
    [5, 'Boredom', '455', 'A'] ,
    [6, 'Table Decorations', '478', 'C'] ,
    [7, 'Beautiful Sets of Points', '268', 'C'] ,
    [8, 'k-Tree', '431', 'C'] ,
    [9, 'Valera and Tubes ', '441', 'C'] ,
    [10, 'Palindrome Transformation', '486', 'C'] ,
    [11, 'Fixing Typos', '363', 'C'] ,
    [12, 'Hacking Cypher', '490', 'C'] ,
    [13, 'Gargari and Bishops', '463', 'C'] ,
    [14, 'Pocket Book', '152', 'C'] ,
    [15, 'Lucky Sum of Digits', '109', 'A'] ,
    [16, 'Arithmetic Progression', '382', 'C'] ,
    [17, 'Fox and Box Accumulation', '388', 'A'] ,
    [18, "Hexadecimal's Numbers", '9', 'C'] ,
    [19, 'Xenia and Weights', '339', 'C'] ,
    [20, 'Bombs', '350', 'C'] ,
    [21, 'Pashmak and Buses', '459', 'C'] ,
    [22, 'Little Elephant and Problem', '220', 'A'] ,
    [23, 'Maze', '377', 'A'] ,
    [24, 'Ice Skating', '217', 'A'] ,
    [25, 'Hamburgers', '371', 'C'] ,
    [26, 'Bear and Prime Numbers', '385', 'C'] ,
    [27, 'History', '137', 'C'] ,
    [28, 'Checkposts', '427', 'C'] ,
    [29, 'Mashmokh and Numbers', '414', 'A'] ,
    [30, 'Ladder', '279', 'C'] ,
    [31, 'Escape from Stones', '264', 'A'] ,
    [32, 'Division into Teams', '149', 'C'] ,
    [33, 'Barcode', '225', 'C'] ,
    [34, 'Stripe', '18', 'C'] ,
    [35, 'Mafia', '348', 'A'] ,
    [36, 'Cows and Sequence', '283', 'A'] ,
    [37, 'To Add or Not to Add', '231', 'C'] ,
    [38, 'Xor-tree', '429', 'A'] ,
    [39, 'LCM Challenge', '235', 'A'] ,
    [40, 'Rational Resistance', '343', 'A'] ,
    [41, 'Points on Line', '251', 'A'] ,
    [42, 'No to Palindromes!', '464', 'A'] ,
    [43, 'Magic Formulas', '424', 'C'] ,
    [44, 'Beautiful Numbers', '300', 'C'] ,
    [45, 'Quiz', '337', 'C'] ,
    [46, 'Replacement', '135', 'A'] ,
    [47, 'Vasya and Robot', '354', 'A'] ,
    [48, 'Captain Marmot', '474', 'C'] ,
    [49, 'Win or Freeze', '150', 'A'] ,
    [50, 'Matrix', '364', 'A'] ,
    [51, 'Little Frog', '53', 'C'] ,
    [52, 'Lucky Sum', '121', 'A'] ,
    [53, 'Fight the Monster', '487', 'A'] ,
    [54, 'Triangle', '407', 'A'] ,
    [55, 'View Angle', '257', 'C'] ,
    [56, "King's Path", '242', 'C'] ,
    [57, 'Round Table Knights', '71', 'C'] ,
    [58, 'Purification', '329', 'A'] ,
    [59, 'Maxim and Discounts', '261', 'A'] ,
    [60, 'The Closest Pair', '311', 'A'] ,
    [61, 'Divisible by Seven', '375', 'A'] ,
    [62, 'Hometask', '154', 'A'] ,
    [63, 'Little Elephant and Interval', '204', 'A'] ,
    [64, 'Dorm Water Supply', '107', 'A'] ,
    [65, 'Shaass and Lights', '294', 'C'] ,
    [66, 'Prime Number', '359', 'C'] ,
    [67, 'The Brand New Function', '243', 'A'] ,
    [68, 'About Bacteria', '198', 'A'] ,
    [69, 'Malek Dance Club', '319', 'A'] ,
    [70, 'Dima and Containers', '358', 'C'] ,
    [71, 'Trains', '87', 'A'] ,
    [72, 'Almost Arithmetical Progression', '255', 'C'] ,
    [73, 'Newspaper Headline', '91', 'A'] ,
    [74, 'Inna and Dima', '374', 'C'] ,
    [75, 'Hiring Staff', '216', 'C'] ,
    [76, 'STL', '190', 'C'] ,
    [77, 'Prime Permutation', '123', 'A'] ,
    [78, 'Four Segments', '14', 'C'] ,
    [79, 'Fire Again', '35', 'C'] ,
    [80, 'Below the Diagonal', '266', 'C'] ,
    [81, 'Mail Stamps', '29', 'C'] ,
    [82, 'Grammar Lessons', '113', 'A'] ,
    [83, 'Bracket Sequence', '223', 'A'] ,
    [84, 'Heroes', '77', 'A'] ,
    [85, 'Literature Lesson', '138', 'A'] ,
    [86, 'Reducing Fractions', '222', 'C'] ,
    [87, 'Game', '213', 'A'] ,
    [88, 'Cutting Figure', '193', 'A'] ,
    [89, 'Trees', '58', 'C'] ,
    [90, 'Hockey', '95', 'A'] ,
    [91, 'Schedule', '31', 'C'] ,
    [92, 'Rectangle Puzzle', '280', 'A'] ,
    [93, 'Disposition', '49', 'C'] ,
    [94, 'Flea', '32', 'C'] ,
    [95, 'Help Victoria the Wise', '98', 'A'] ,
    [96, 'Corporation Mail', '56', 'C'] ,
    [97, 'Optimal Sum', '182', 'C'] ,
    [98, 'On Number of Decompositions into Multipliers', '396', 'A'] ,
    [99, 'Blocked Points', '392', 'A'] ,
    [100, 'Crossword', '47', 'C'] 
]

div_d = [
    [1, 'Flowers', '474', 'D'] ,
    [2, 'Prizes, Prizes, more Prizes', '208', 'D'] ,
    [3, 'Xenia and Bit Operations', '339', 'D'] ,
    [4, 'Vasya and Chess', '493', 'D'] ,
    [5, 'Mashmokh and ACM', '414', 'B'] ,
    [6, 'Multiplication Table', '448', 'D'] ,
    [7, 'Unbearable Controversy of Being', '489', 'D'] ,
    [8, "Caesar's Legions", '118', 'D'] ,
    [9, 'Colorful Graph', '246', 'D'] ,
    [10, 'Little Girl and Maximum XOR', '276', 'D'] ,
    [11, 'Common Divisors', '182', 'D'] ,
    [12, 'Magic Box', '231', 'D'] ,
    [13, 'Good Sequences', '264', 'B'] ,
    [14, 'Password', '126', 'B'] ,
    [15, 'Greg and Graph', '295', 'B'] ,
    [16, 'Working out', '429', 'B'] ,
    [17, 'Count Good Substrings', '451', 'D'] ,
    [18, 'Good Substrings', '271', 'D'] ,
    [19, 'Long Path', '407', 'B'] ,
    [20, 'Maximum Value', '484', 'B'] ,
    [21, 'Greenhouse Effect', '269', 'B'] ,
    [22, 'Red-Green Towers', '478', 'D'] ,
    [23, 'Maximum Submatrix 2', '375', 'B'] ,
    [24, 'Cow Program', '283', 'B'] ,
    [25, 'Biridian Forest', '329', 'B'] ,
    [26, 'Andrey and Problem', '442', 'B'] ,
    [27, 'DZY Loves Modification', '446', 'B'] ,
    [28, 'Zero Tree', '274', 'B'] ,
    [29, 'Prefixes and Suffixes', '432', 'D'] ,
    [30, 'Queue', '91', 'B'] ,
    [31, 'Chips', '333', 'B'] ,
    [32, 'Valid Sets', '486', 'D'] ,
    [33, 'Pair of Numbers', '359', 'D'] ,
    [34, 'Planets', '229', 'B'] ,
    [35, 'Queue', '353', 'D'] ,
    [36, 'Petya and Divisors', '111', 'B'] ,
    [37, 'Obsessive String', '494', 'B'] ,
    [38, 'Dima and Bacteria', '400', 'D'] ,
    [39, 'Psychos in a Line', '319', 'B'] ,
    [40, 'Ciel and Duel', '321', 'B'] ,
    [41, 'Falling Anvils', '77', 'B'] ,
    [42, 'Hit Ball', '203', 'D'] ,
    [43, 'Toy Sum', '405', 'D'] ,
    [44, 'Lucky Common Subsequence', '346', 'B'] ,
    [45, 'Two Paths', '14', 'D'] ,
    [46, 'Help General', '142', 'B'] ,
    [47, 'Dima and Two Sequences', '272', 'D'] ,
    [48, 'How many trees?', '9', 'D'] ,
    [49, 'Lucky Number 2', '145', 'B'] ,
    [50, 'Cinema', '234', 'D'] ,
    [51, 'Wizards and Huge Prize', '167', 'B'] ,
    [52, 'Apple Tree', '348', 'B'] ,
    [53, 'Yaroslav and Time', '301', 'B'] ,
    [54, 'Numbers', '213', 'B'] ,
    [55, 'Treasure Island', '106', 'D'] ,
    [56, 'Book of Evil', '337', 'D'] ,
    [57, 'Sereja and Periods', '314', 'B'] ,
    [58, 'Infinite Maze', '196', 'B'] ,
    [59, 'Playing with Permutations', '251', 'B'] ,
    [60, 'Doctor', '83', 'B'] ,
    [61, 'Animals', '35', 'D'] ,
    [62, 'Mushroom Scientists', '185', 'B'] ,
    [63, 'Tennis Game', '496', 'D'] ,
    [64, 'Buses', '101', 'B'] ,
    [65, 'String', '128', 'B'] ,
    [66, 'Shifting', '286', 'B'] ,
    [67, 'Boring Partition', '238', 'B'] ,
    [68, 'Analyzing Polyline', '195', 'D'] ,
    [69, 'Vasya and Types', '87', 'B'] ,
    [70, 'Lizards and Basements 2', '6', 'D'] ,
    [71, 'Constellation', '32', 'D'] ,
    [72, 'Pawn', '41', 'D'] ,
    [73, 'Journey', '43', 'D'] ,
    [74, 'Tanya and Password', '508', 'D'] ,
    [75, 'Demonstration', '191', 'B'] ,
    [76, 'Big Maximum Sum', '75', 'D'] ,
    [77, 'The Child and Zoo', '437', 'D'] ,
    [78, 'Mr. Bender and Square', '255', 'D'] ,
    [79, 'Special Grid', '435', 'D'] ,
    [80, 'Name That Tune', '498', 'B'] ,
    [81, 'Ring Road 2', '27', 'D'] ,
    [82, 'Russian Roulette', '103', 'C'] ,
    [83, 'Snake', '225', 'D'] ,
    [84, 'Upgrading Array', '402', 'D'] ,
    [85, 'Edges in MST', '160', 'D'] ,
    [86, 'Fools and Foolproof Roads', '362', 'D'] ,
    [87, 'End of Exams', '93', 'B'] ,
    [88, 'Restoring Numbers', '509', 'D'] ,
    [89, 'Cats Transport', '311', 'B'] ,
    [90, 'Broken Monitor', '370', 'D'] ,
    [91, 'The Minimum Number of Variables', '279', 'D'] ,
    [92, 'Volcanoes', '383', 'B'] ,
    [93, 'Widget Library', '89', 'B'] ,
    [94, 'Misha and Permutations Summation', '501', 'D'] ,
    [95, 'BerDonalds', '266', 'D'] ,
    [96, 'Tower of Hanoi', '392', 'B'] ,
    [97, "Mr. Kitayuta's Technology", '505', 'D'] ,
    [98, 'Shoe Store', '166', 'D'] ,
    [99, 'Inna and Sweet Matrix', '390', 'D'] ,
    [100, 'Help King', '98', 'B']
]

div_e = [
    [1, 'Pashmak and Graph', '459', 'E'] ,
    [2, 'Civilization', '455', 'C'] ,
    [3, 'Sereja and Brackets', '380', 'C'] ,
    [4, 'Propagating tree', '383', 'C'] ,
    [5, 'XOR on Segment', '242', 'E'] ,
    [6, 'Yet Another Task with Queens', '131', 'E'] ,
    [7, 'Mashmokh and Reverse Operation', '414', 'C'] ,
    [8, 'Choosing Balls', '264', 'C'] ,
    [9, 'Subsegments', '69', 'E'] ,
    [10, 'Sausage Maximization', '282', 'E'] ,
    [11, 'Games with Rectangle', '128', 'C'] ,
    [12, 'Riding in a Lift', '479', 'E'] ,
    [13, 'Fools and Roads', '191', 'C'] ,
    [14, 'Enemy is weak', '61', 'E'] ,
    [15, 'Cipher', '156', 'C'] ,
    [16, 'Flawed Flow', '269', 'C'] ,
    [17, 'Greg and Friends', '295', 'C'] ,
    [18, 'Fish', '16', 'E'] ,
    [19, 'Main Sequence', '286', 'C'] ,
    [20, 'Jzzhu and Apples', '449', 'C'] ,
    [21, 'Arthur and Brackets', '508', 'E'] ,
    [22, 'Little Elephant and LCM', '258', 'C'] ,
    [23, 'Prefix Product Sequence', '487', 'C'] ,
    [24, 'Lucky Subsequence', '145', 'C'] ,
    [25, 'Interesting Game', '87', 'C'] ,
    [26, 'Zero-One', '135', 'C'] ,
    [27, 'Divisors', '448', 'E'] ,
    [28, 'Game on Tree', '280', 'C'] ,
    [29, 'Last Chance', '137', 'E'] ,
    [30, 'Build String', '237', 'E'] ,
    [31, 'Number Transformation II', '346', 'C'] ,
    [32, 'Double Profiles', '154', 'C'] ,
    [33, 'Number Transformation', '251', 'C'] ,
    [34, 'DZY Loves Fibonacci Numbers', '446', 'C'] ,
    [35, 'DZY Loves Colors', '444', 'C'] ,
    [36, 'Little Elephant and Shifts', '220', 'C'] ,
    [37, 'Inna and Binary Logic', '400', 'E'] ,
    [38, 'Martian Strings', '149', 'E'] ,
    [39, 'Devu and Birthday Celebration', '439', 'E'] ,
    [40, 'Iahub and Permutations', '340', 'E'] ,
    [41, 'Hiking', '489', 'E'] ,
    [42, 'Splitting the Uniqueness', '297', 'C'] ,
    [43, 'George and Cards', '387', 'E'] ,
    [44, 'Dima and Magic Guitar', '366', 'E'] ,
    [45, 'Ski Base', '91', 'C'] ,
    [46, 'Wrong Floyd', '350', 'E'] ,
    [47, 'Empire Strikes Back', '300', 'E'] ,
    [48, 'Mushroom Gnomes - 2', '138', 'C'] ,
    [49, 'Parking Lot', '219', 'E'] ,
    [50, 'Xenia and Tree', '342', 'E'] ,
    [51, 'Cactus', '231', 'E'] ,
    [52, 'Anniversary', '226', 'C'] ,
    [53, 'Hack it!', '468', 'C'] ,
    [54, 'Graph Reconstruction', '329', 'C'] ,
    [55, 'Help Caretaker', '142', 'C'] ,
    [56, 'Martian Luck', '216', 'E'] ,
    [57, 'Collisions', '34', 'E'] ,
    [58, 'Chip Play', '89', 'C'] ,
    [59, 'Beautiful Set', '364', 'C'] ,
    [60, 'Strictly Positive Matrix', '402', 'E'] ,
    [61, 'Square Tiling', '432', 'E'] ,
    [62, 'Game', '277', 'C'] ,
    [63, 'Dreamoon and Strings', '476', 'E'] ,
    [64, 'Counter Attack', '190', 'E'] ,
    [65, 'Three Horses', '271', 'E'] ,
    [66, 'Playing with String', '305', 'E'] ,
    [67, 'Colorado Potato Beetle', '243', 'C'] ,
    [68, 'Three Swaps', '339', 'E'] ,
    [69, 'Cyclical Quest', '235', 'C'] ,
    [70, 'Petya and Pipes', '362', 'E'] ,
    [71, 'Common ancestor', '49', 'E'] ,
    [72, 'Neatness', '359', 'E'] ,
    [73, 'Yaroslav and Algorithm', '301', 'C'] ,
    [74, 'Strange Sorting', '484', 'C'] ,
    [75, 'Helping People', '494', 'C'] ,
    [76, 'Dima and Kicks', '358', 'E'] ,
    [77, 'Hamming Distance', '193', 'C'] ,
    [78, 'Delivering Carcinogen', '198', 'C'] ,
    [79, 'Graph Cutting', '405', 'E'] ,
    [80, 'The Last Hole!', '274', 'C'] ,
    [81, 'Circling Round Treasures', '375', 'C'] ,
    [82, 'Lucky Tickets', '333', 'C'] ,
    [83, 'Help Greg the Dwarf', '98', 'C'] ,
    [84, 'Transportation', '203', 'E'] ,
    [85, "Ship's Shortest Path", '75', 'E'] ,
    [86, 'Horse Races', '95', 'D'] ,
    [87, 'Roland and Rose', '460', 'E'] ,
    [88, 'Binary Key', '332', 'E'] ,
    [89, 'Yet Another Number Sequence', '392', 'C'] ,
    [90, "Piglet's Birthday", '248', 'E'] ,
    [91, 'Inna and Large Sweet Matrix', '390', 'E'] ,
    [92, 'Two Circles', '363', 'E'] ,
    [93, 'Fox And Dinner', '510', 'E'] ,
    [94, 'Ksenia and Combinatorics', '382', 'E'] ,
    [95, 'Misha and Palindrome Degree', '501', 'E'] ,
    [96, 'Expression', '58', 'E'] ,
    [97, 'Lightbulb for Minister', '394', 'E'] ,
    [98, 'Clever Fat Rat', '185', 'C'] ,
    [99, 'MUH and Lots and Lots of Segments', '471', 'E'] 
]

div_1d = [
    [1, 'Tricky Function', '429', 'D'] ,
    [2, 'Characteristics of Rectangles', '333', 'D'] ,
    [3, 'Antimatter', '383', 'D'] ,
    [4, 'The Child and Sequence', '438', 'D'] ,
    [5, 'Kindergarten', '484', 'D'] ,
    [6, 'Water Tree', '343', 'D'] ,
    [7, 'Towers', '229', 'D'] ,
    [8, 'Numbers', '128', 'D'] ,
    [9, 'Sereja and Squares', '425', 'D'] ,
    [10, 'Hill Climbing', '406', 'D'] ,
    [11, 'Yaroslav and Divisors', '301', 'D'] ,
    [12, 'Jzzhu and Numbers', '449', 'D'] ,
    [13, 'Game with Powers', '317', 'D'] ,
    [14, 'The table', '226', 'D'] ,
    [15, 'Time to Raid Cowavans', '103', 'D'] ,
    [16, 'Beautiful Pairs of Numbers', '403', 'D'] ,
    [17, 'Lovely Matrix', '274', 'D'] ,
    [18, 'Constants in the language of Shakespeare', '132', 'D'] ,
    [19, 'Polo the Penguin and Trees ', '288', 'D'] ,
    [20, 'Tree and Queries', '375', 'D'] ,
    [21, 'Traffic Jams in the Land', '498', 'D'] ,
    [22, 'Mashmokh and Water Tanks', '414', 'D'] ,
    [23, 'Iahub and Xors', '341', 'D'] ,
    [24, 'Fibonacci Sums', '126', 'D'] ,
    [25, 'Numbers', '83', 'D'] ,
    [26, 'Developing Game', '377', 'D'] ,
    [27, 'Little Elephant and Broken Sorting', '258', 'D'] ,
    [28, 'Clues', '156', 'D'] ,
    [29, 'Sereja and Sets', '367', 'D'] ,
    [30, 'Interval Cubing', '311', 'D'] ,
    [31, 'Cows and Cool Sequences', '283', 'D'] ,
    [32, 'Sereja and Straight Lines', '314', 'D'] ,
    [33, 'Beautiful Road', '87', 'D'] ,
    [34, 'Turtles', '348', 'D'] ,
    [35, 'Greg and Caves', '295', 'D'] ,
    [36, 'String', '123', 'D'] ,
    [37, 'Color the Carpet', '297', 'D'] ,
    [38, 'Adam and Tree', '442', 'D'] ,
    [39, 'Choosing Subtree is Fun', '372', 'D'] ,
    [40, 'Sereja and Cinema', '380', 'D'] ,
    [41, 'Petya and Coloring', '111', 'D'] ,
    [42, 'Stars', '213', 'D'] ,
    [43, 'Ghd', '364', 'D'] ,
    [44, 'Flatland Fencing', '154', 'D'] ,
    [45, 'Little Elephant and Retro Strings', '204', 'D'] ,
    [46, 'Castle', '101', 'D'] ,
    [47, 'Parcels', '480', 'D'] ,
    [48, 'Brand New Problem', '201', 'D'] ,
    [49, 'Largest Submatrix 3', '407', 'D'] ,
    [50, 'Maximum Waterfall', '269', 'D'] ,
    [51, 'Bags and Coins', '356', 'D'] ,
    [52, 'Flags', '93', 'D'] ,
    [53, 'Little Elephant and Triangle', '220', 'D'] ,
    [54, 'Domino Carpet', '77', 'D'] ,
    [55, 'GCD Table', '338', 'D'] ,
    [56, 'Museum', '113', 'D'] ,
    [57, 'Maxim and Increasing Subsequence', '261', 'D'] ,
    [58, 'Visit of the Great', '185', 'D'] ,
    [59, 'Tourists', '286', 'D'] ,
    [60, 'Robot Control', '346', 'D'] ,
    [61, 'Space mines', '89', 'D'] ,
    [62, 'World of Darkraft', '138', 'D'] ,
    [63, 'Dima and Figure', '273', 'D'] ,
    [64, 'Jeff and Removing Periods', '351', 'D'] ,
    [65, 'Colorful Stones', '264', 'D'] ,
    [66, 'The Next Good String', '196', 'D'] ,
    [67, 'Mission Impassable', '150', 'D'] ,
    [68, 'Conveyor Belts', '487', 'D'] ,
    [69, 'Have You Ever Heard About the Word?', '319', 'D'] ,
    [70, 'Birthday', '494', 'D'] ,
    [71, 'Horse Races', '95', 'D'] ,
    [72, 'Fence', '232', 'D'] ,
    [73, 'k-Maximum Subsequence Sum', '280', 'D'] ,
    [74, 'BRT Contract ', '187', 'D'] ,
    [75, 'Liars and Serge', '256', 'D'] ,
    [76, 'Levko and Sets', '360', 'D'] ,
    [77, 'Appleman and Complicated Task', '461', 'D'] ,
    [78, 'Donkey and Stars', '249', 'D'] ,
    [79, 'Ciel and Flipboard', '321', 'D'] ,
    [80, 'Unambiguous Arithmetic Expression', '115', 'D'] ,
    [81, 'Two Segments', '193', 'D'] ,
    [82, 'Rotatable Number', '303', 'D'] ,
    [83, 'Metro Scheme', '191', 'D'] ,
    [84, 'Help Monks', '98', 'D'] ,
    [85, "Bitonix' Patrol", '217', 'D'] ,
    [86, 'Random Function and Tree', '482', 'D'] ,
    [87, 'Lucky Pair', '145', 'D'] ,
    [88, 'On Sum of Number of Inversions in Permutations', '396', 'D'] ,
    [89, 'Google Code Jam', '277', 'D'] ,
    [90, 'Misha and XOR', '504', 'D'] ,
    [91, 'Fox and Perfect Sets', '388', 'D'] ,
    [92, 'DZY Loves Games', '446', 'D'] ,
    [93, "Nanami's Power Plant", '434', 'D'] ,
    [94, 'Fox And Travelling', '512', 'D'] ,
    [95, 'Graph Game', '235', 'D'] ,
    [96, 'Tape Programming', '238', 'D'] ,
    [97, 'Little Pony and Elements of Harmony', '453', 'D'] ,
    [98, 'Three Arrays', '392', 'D'] ,
    [99, 'Tree', '468', 'D'] ,
    [100, 'Cube Snake', '198', 'D'] 
]

div_1e = [
    [1, 'Jeff and Permutation', '351', 'E'] ,
    [2, 'Lucky Number Representation', '354', 'E'] ,
    [3, 'Lucky Queries', '145', 'E'] ,
    [4, 'Little Elephant and Inversions', '220', 'E'] ,
    [5, 'Little Elephant and Tree', '258', 'E'] ,
    [6, 'Lucky Array', '121', 'E'] ,
    [7, 'Lucky Country', '95', 'E'] ,
    [8, 'Ciel and Gondolas', '321', 'E'] ,
    [9, 'Lucky Arrays', '256', 'E'] ,
    [10, 'Gifts', '229', 'E'] ,
    [11, 'Sign on Fence', '484', 'E'] ,
    [12, 'Gripping Story', '198', 'E'] ,
    [13, 'Opening Portals', '196', 'E'] ,
    [14, 'Optimize!', '338', 'E'] ,
    [15, 'Sereja and Sets', '425', 'E'] ,
    [16, 'Little Elephant and Strings', '204', 'E'] ,
    [17, 'Lostborn', '93', 'E'] ,
    [18, 'Bits of merry old England', '132', 'E'] ,
    [19, 'Igloo Skyscraper', '91', 'E'] ,
    [20, 'Vowels', '383', 'E'] ,
    [21, 'Cow Tennis Tournament', '283', 'E'] ,
    [22, 'Thoroughly Bureaucratic Organization', '201', 'E'] ,
    [23, 'Candies and Stones', '101', 'E'] ,
    [24, 'Sereja and Intervals', '367', 'E'] ,
    [25, "Ladies' Shop", '286', 'E'] ,
    [26, 'Martian Food', '77', 'E'] ,
    [27, 'Buying Sets', '103', 'E'] ,
    [28, 'Wizards and Bets', '167', 'E'] ,
    [29, 'Maxim and Calculator', '261', 'E'] ,
    [30, 'Stairs and Lines', '498', 'E'] ,
    [31, 'Maze', '123', 'E'] ,
    [32, 'Alien DNA', '217', 'E'] ,
    [33, 'Number Challenge', '235', 'E'] ,
    [34, 'Fibonacci Number', '193', 'E'] ,
    [35, "Noble Knight's Path", '226', 'E'] ,
    [36, 'Biologist', '311', 'E'] ,
    [37, 'Polo the Penguin and Lucky Numbers', '288', 'E'] ,
    [38, 'Dima and Game', '273', 'E'] ,
    [39, 'Candies Game', '341', 'E'] ,
    [40, 'Endless Matrix', '249', 'E'] ,
    [41, 'Freezing with Style', '150', 'E'] ,
    [42, 'Road Repairs', '240', 'E'] ,
    [43, 'Weak Subsequence', '135', 'E'] ,
    [44, 'Sereja and Squares', '314', 'E'] ,
    [45, 'Levko and Game', '360', 'E'] ,
    [46, 'Ping-Pong', '319', 'E'] ,
    [47, 'Function', '455', 'E'] ,
    [48, 'Quick Tortoise', '232', 'E'] ,
    [49, 'Pilgrims', '348', 'E'] ,
    [50, 'The Classic Problem', '464', 'E'] ,
    [51, 'Meeting Her', '238', 'E'] ,
    [52, 'Mystic Carvings', '297', 'E'] ,
    [53, 'Yaroslav and Arrangements', '301', 'E'] ,
    [54, 'Jzzhu and Squares', '449', 'E'] ,
    [55, 'Roadside Trees', '264', 'E'] ,
    [56, 'Appleman and a Game', '461', 'E'] ,
    [57, 'Parking Lot', '480', 'E'] ,
    [58, 'Cookie Clicker', '377', 'E'] ,
    [59, 'Doodle Jump', '346', 'E'] ,
    [60, 'Xenia and String Problem', '356', 'E'] ,
    [61, 'Mogohu-Rea Idol', '87', 'E'] ,
    [62, 'Random Ranking', '303', 'E'] ,
    [63, 'Empty Rectangles', '364', 'E'] ,
    [64, 'Mirror Room', '274', 'E'] ,
    [65, 'Little Pony and Lord Tirek', '453', 'E'] ,
    [66, 'k-d-sequence', '407', 'E'] ,
    [67, 'Drawing Circles is Fun', '372', 'E'] ,
    [68, 'Fox And Polygon', '512', 'E'] ,
    [69, 'Evil', '329', 'E'] ,
    [70, 'Darts', '107', 'E'] ,
    [71, 'Subsequences Return', '497', 'E'] ,
    [72, 'Red and Black Tree', '375', 'E'] ,
    [73, 'The Child and Binary Tree', '438', 'E'] ,
    [74, 'Sequence Transformation', '280', 'E'] ,
    [75, 'Gena and Second Distance', '442', 'E'] ,
    [76, 'Two Rooted Trees', '403', 'E'] ,
    [77, 'Matrix', '243', 'E'] ,
    [78, 'Planar Graph', '223', 'E'] ,
    [79, 'Misha and LCP on Tree', '504', 'E'] ,
    [80, 'Sleeping', '113', 'E'] ,
    [81, 'String Theory', '269', 'E'] ,
    [82, 'Martian Colony', '154', 'E'] ,
    [83, 'Birthday', '128', 'E'] ,
    [84, 'Sharti', '494', 'E'] ,
    [85, 'Tourists', '487', 'E'] ,
    [86, "Furukawa Nagisa's Tree", '434', 'E'] ,
    [87, 'ELCA', '482', 'E'] ,
    [88, 'Lucky Interval', '109', 'E'] ,
    [89, 'On Iteration of One Well-Known Function', '396', 'E'] ,
    [90, 'Soap Time! - 2', '185', 'E'] ,
    [91, "Mashmokh's Designed Problem", '414', 'E'] ,
    [92, 'Fox and Meteor Shower', '388', 'E'] ,
    [93, 'Heaven Tour', '187', 'E'] ,
    [94, 'Fire and Ice', '89', 'E'] ,
    [95, 'Pills', '126', 'E'] ,
    [96, 'Dreamoon and Notepad', '477', 'E'] ,
    [97, 'Sorting Permutations', '398', 'E'] ,
    [98, 'Help Greg the Dwarf 2', '142', 'E'] ,
    [99, 'Petya and Rectangle', '111', 'E'] ,
    [100, 'Permanent', '468', 'E']
]