Under construction

Still being built. Things may change

Gahee and the Sub-station Name

Time limit1sMemory limit512 MB

Summary
Given one line with a station name and an optional sub-station name in parentheses, print the station name and the sub-station name, or '-' if there is none.
Level

Easy1 of 10

Topics
String
Solved
No attempts yet

Problem

Some subway stations have a sub-station name in parentheses after the station name. For example, Soongsil Univ Entrance Station has the sub-station name Salpijae. Given the station information, print the station name and the sub-station name.

Input

The first line contains the station information in one of the two formats below.

  • {station_name}
  • {station_name} {open_character}{sub_station_name}{close_character}

station_name is the station name, and sub_station_name is the sub-station name.

In the second format, open_character is '(' and close_character is ')'.

Output

Print the station name on the first line and the sub-station name on the second line. If there is no sub-station name, print '-' instead.

Constraints

station_name and sub_station_name satisfy the following.

  • They contain only English letters (upper and lower case), the dash '-', digits, and space characters.
  • Space characters do not appear consecutively, and the string neither starts nor ends with a space character.
  • The length is at least 22 and at most 5050.

Examples5

  1. Example 1

    Input
    palindrome (yeokgok yeokcheon yeoksam)
    
    Expected output
    palindrome
    yeokgok yeokcheon yeoksam
    
  2. Example 2

    Input
    ori
    
    Expected output
    ori
    -
    
  3. Example 3

    Input
    AfterSchool (Flask-back)
    
    Expected output
    AfterSchool
    Flask-back
    
  4. Example 4

    Input
    Infinity (girls next door)
    
    Expected output
    Infinity
    girls next door
    
  5. Example 5

    Input
    Soongsil Univ (Salpijae)
    
    Expected output
    Soongsil Univ
    Salpijae