proc getchar_unlocked():char {. importc:"getchar_unlocked",header: "" .} proc printf(formatstr: cstring){.header: "", varargs.} var S : array[100002,char] var left = 0 var l = 0 while true: l += 1 let c = getchar_unlocked() S[l] = c if c == 'o' : left += 1 elif c != 'x': break for i in 1..