HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


50621 - Postal Figures

Guest
• Review clarifications (1)

Section problems

• 50900 - Put the Numbers in Descend...
• 50884 - Area and Perimeter Of The ...
• 50899 - How Many Years
• 50610 - Feasibility
• 50612 - Fun game
• 50617 - KBH
• 50618 - Code Correction
• 50620 - Poker
• 50621 - Postal Figures
• 50630 - Radio Station
• 50631 - Robots
• 50251 - Symmetric matrix
• 50244 - Chessboard Pattern
• 50428 - Three Times
• 50879 - Passed or Failed
• 50387 - Passengers in the Train
• 50438 - Pattern with stars

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