HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Problems from everywhere > problem:


50621 - Postal Figures

Guest
• Review clarifications (1)

Volume problems

• 50580 - Days passed
• 50590 - Bronze medalists
• 50602 - Birthday Ivanova
• 50603 - Rider
• 50604 - Viruses
• 50611 - Maximum of the minima
• 50612 - Fun game
• 50613 - Zapakovka
• 50621 - Postal Figures
• 50622 - Sequence
• 50623 - Rectangles
• 50630 - Radio Station
• 50631 - Robots
• 50642 - Draft board
• 50643 - Stepeny couples
• 50644 - Capital
• 50645 - Line

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