#abc299a. A - Treasure Chest

A - Treasure Chest

Score : 100100 points

问题描述

你将得到一个长度为 NN 的字符串 SS,该字符串由三种字符组成:.|*。其中,SS 中恰好包含两个 | 和一个 *

判断 * 是否位于两个 | 之间,如果在,则输出 in;否则,输出 out

更形式化地表述,即判断 * 前面的字符中是否有 |,且 * 后面的字符中是否有 |

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

Problem Statement

You are given a string SS of length NN consisting of three kinds of characters: ., |, and *. SS contains exactly two | and exactly one *.

Determine whether the * is between the two |, and if so, print in; otherwise, print out.

More formally, determine whether one of the characters before the * is | and one of the characters after the * is |.

Constraints

  • 3N1003\leq N\leq 100
  • NN is an integer.
  • SS is a string of length NN consisting of ., |, and *.
  • SS contains exactly two |.
  • SS contains exactly one *.

Input

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

NN

SS

Output

Print a single line containing in if the * is between the two |, and out otherwise.

Sample Input 1

10
.|..*...|.

Sample Output 1

in

Between the two |, we have |..*...|, which contains *, so you should print in.

Sample Input 2

10
.|..|.*...

Sample Output 2

out

Between the two |, we have |..|, which does not contain *, so you should print out.

Sample Input 3

3
|*|

Sample Output 3

in

update @ 2024/3/10 12:23:44

}