HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Volumes > Problems from everywhere > problem:


50621 - Postal Figures

Guest
• Review clarifications (1)

Volume problems

• 50670 - Picture
• 50612 - Fun game
• 50621 - Postal Figures
• 50630 - Radio Station
• 50631 - Robots
• KBH-1012. 50617 - KBH
• KBH-1013. 50618 - Code Correction
• VologdaInterUni-D. 50610 - Feasibility
• 50561 - Lucky tickets
• 50590 - Bronze medalists
• 50604 - Viruses

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