HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50621 - Postal Figures

Guest
• Review clarifications (1)

Section problems

• 50610 - Feasibility
• 50612 - Fun game
• 50614 - Numbers game
• 50615 - Moneybox
• 50617 - KBH
• 50618 - Code Correction
• 50619 - The Mars Rover
• 50620 - Poker
• 50621 - Postal Figures
• 50622 - Sequence
• 50623 - Rectangles
• 50624 - Simple problem
• 50625 - Permutations
• 50626 - The route
• 50627 - Area of a polygon
• 50628 - Matrix
• 50629 - Minuses

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.

We all know how to write the zip code on an envelope. The rules for recording these figures are given below. The numbers in the number record are separated from each other by a single space bar. Your task is to recognize the number written by asterisks according to the "postal rules" and output the maximum number of this number to the output file.


Analyze the number on the input and output the maximum number of this number.

Input Specification:
Starting with the first line, the numbers in the analyzed number are written. Number of digits: 1 ≤ n ≤ 10. Each digit occupies 5 columns. Figures are separated from each other by a column of spaces. The last character in each line is a period. Thus, the number in the file occupies 9 equal in length lines, each of which contains asterisks, spaces and a dot at the end. The length of each line is 6 * n.

Output Specification:
Output one decimal digit: max digit.

Sample Input
***** *   * *****     *.
   *  *   * *        * .
  *   *   * *       *  .
 *    *   * *      *   .
***** ***** ***** *****.
   *      *     * *   *.
  *       *     * *   *.
 *        *     * *   *.
*         * ***** *****.
Sample Output
6

Для отправки решений необходимо выполнить вход.

www.contester.ru