#abc296b. B - Chessboard

B - Chessboard

Score : 200200 points

问题描述

在棋盘上定位一个棋子。

我们有一个包含8行和8列格子的网格。每个格子都有一个由以下方式确定的2字符名称。

  • 左起第1列格子的名字的第一个字符是 a。类似地,左起第2列、第3列、……、第8列格子的名字的第一个字符依次是 bcdefgh
  • 从底部数起第1行格子的名字的第二个字符是 1。同样地,从底部数起第2行、第3行、……、第8行格子的名字的第二个字符依次是 2345678

例如,左下角的格子名为 a1,右下角的格子名为 h1,而右上角的格子名为 h8

你将得到8个长度为8的字符串 S1,,S8S_1,\ldots,S_8,它们代表网格的状态。 其中,SiS_i 的第 jj 个字符如果是 *,表示从顶部数起第 ii 行、从左边数起第 jj 列的格子上有一个棋子,否则为.。在 S1,,S8S_1,\ldots,S_8 中,字符 * 出现恰好一次。请找出放置有棋子的格子的名字。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

Locate a piece on a chessboard.

We have a grid with 88 rows and 88 columns of squares. Each of the squares has a 22-character name determined as follows.

  • The first character of the name of a square in the 11-st column from the left is a. Similarly, the first character of the name of a square in the 22-nd, 33-rd, \ldots, 88-th column from the left is b, c, d, e, f, g, h, respectively.
  • The second character of the name of a square in the 11-st row from the bottom is 1. Similarly, the second character of the name of a square in the 22-nd, 33-rd, \ldots, 88-th row from the bottom is 2, 3, 4, 5, 6, 7, 8, respectively.

For instance, the bottom-left square is named a1, the bottom-right square is named h1, and the top-right square is named h8.

You are given 88 strings S1,,S8S_1,\ldots,S_8, each of length 88, representing the state of the grid.
The jj-th character of SiS_i is * if the square at the ii-th row from the top and jj-th column from the left has a piece on it, and . otherwise. The character * occurs exactly once among S1,,S8S_1,\ldots,S_8. Find the name of the square that has a piece on it.

Constraints

  • SiS_i is a string of length 88 consisting of . and*.
  • The character * occurs exactly once among S1,,S8S_1,\ldots,S_8.

Input

The input is given from Standard Input in the following format:

S1S_1

S2S_2

S3S_3

S4S_4

S5S_5

S6S_6

S7S_7

S8S_8

Output

Print the answer.

Sample Input 1

........
........
........
........
........
........
........
*.......

Sample Output 1

a1

As explained in the problem statement, the bottom-left square is named a1.

Sample Input 2

........
........
........
........
........
.*......
........
........

Sample Output 2

b3

update @ 2024/3/10 12:17:56