Numbering of series
The creators of the animated series "Futurama" use a specific numbering system called the "production code" when developing episodes. Each episode is categorized into production blocks. The production code follows the format xACVyy, where x represents the production block number (which can be one or two digits), and yy is the episode number within that block (always two digits, potentially with a leading zero). When episodes are aired on television, they are identified using a different numbering system known as the "broadcast code." This code is formatted as SxxEyy, where xx is the season number, and yy is the episode number within that season. Both xx and yy are two-digit numbers, possibly with leading zeros. The sequence and total number of episodes remain consistent between production and broadcast.
Given the details about the number of production blocks, seasons, and the number of episodes in each block and season, your task is to create a "dictionary" that maps each production code to its corresponding broadcast code.
Input
The first line contains two integers N and M (1 ≤ N, M ≤ 50) — representing the number of production blocks and seasons, respectively.
The second line lists N integers, each indicating the number of episodes in one of the N production blocks. Each block contains between 1 and 50 episodes.
The third line lists M integers, each indicating the number of episodes in one of the M seasons. Each season contains between 1 and 50 episodes.
Output
For each episode, print the production code followed by the broadcast code, separated by a space. The output should reflect the order in which the episodes were produced.