atcoder#ABC282C. [ABC282C] String Delimiter

[ABC282C] String Delimiter

Score : 300300 points

Problem Statement

You are given a string SS of length NN consisting of lowercase English letters, ,, and ". It is guaranteed that SS contains an even number of ".

Let 2K2K be the number of " in SS. For each i=1,2,,Ki=1,2,\ldots,K, the characters from the (2i1)(2i-1)-th " through the (2i)(2i)-th " are said to be enclosed.

Your task is to replace each , in SS that is not an enclosed character with . and print the resulting string.

Constraints

  • NN is an integer between 11 and 2×1052\times 10^5, inclusive.
  • SS is a string of length NN consisting of lowercase English letters, ,, and ".
  • SS contains an even number of ".

Input

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

NN

SS

Output

Print the answer.

8
"a,b"c,d
"a,b"c.d

In SS, "a,b" are enclosed characters, and c,d are not.

The , in SS that is not an enclosed character is the seventh character from the left in SS, so replace that character with . to get the answer.

5
,,,,,
.....
20
a,"t,"c,"o,"d,"e,"r,
a."t,"c."o,"d."e,"r.