#K89302. Extracting Error Log IDs

    ID: 37500 Type: Default 1000ms 256MiB

Extracting Error Log IDs

Extracting Error Log IDs

You are given a series of log entries. Each entry is in the format "type identifier", where type is a string (either "info" or "error") and identifier is a unique string without spaces. Your task is to extract the identifiers for the log entries where the type is exactly "error" and print them in the order they appear.

Input is read from standard input and output is printed to standard output. If there are no error logs, output an empty line.

Note: When representing formulas or specific text, please use LaTeX formatting (for instance, use error\texttt{error} to denote the error keyword).

inputFormat

The first line contains an integer nn (1n1051 \le n \le 10^5), representing the number of log entries. Each of the following nn lines contains a log entry with two tokens: the log type and its identifier. The log type will be either "info" or "error".

outputFormat

Output a single line containing the identifiers of all error logs in the order they appear, separated by a single space. If there are no error logs, output an empty line.## sample

5
info 123
error 456
info 789
error 101
error 202
456 101 202