The chef is having one string of English lower case alphabets only. The chef wants to remove all "abc" special pairs where a,b,c are occurring consecutively. After removing the pair, create a new string and again remove "abc" special pair from a newly formed string. Repeate the process until no such pair remains in a string.

-----Input:-----
- First line will contain $T$, number of testcases. Then the testcases follow. 
- Each testcase contains of a single line of input, $String$. 

-----Output:-----
For each testcase, output in a single line answer, new String with no "abc" special pair.

-----Constraints:-----
$T \leq 2 $
$1 \leq String length \leq 1000 $

-----Sample Input:-----
2
aabcc
bababccc

-----Sample Output:-----
ac
bc

-----EXPLANATION:-----
For 1) after removing "abc" at middle we get a new string as ac.
For 2) string = bababccc
newString1 = babcc  // After removing middle "abc"
newString2 = bc   //After removing "abc"

Starter code:

Solutions:
# cook your dish here
for _ in range(int(input())):
    s=input()
    while(s.count("abc")!=0):
        s=s.replace("abc","")
    print(s)    


# cook your dish here
for i in range(int(input())):
    txt=input()
    
    while(True):
        l=len(txt)
        x = txt.replace("abc","")
        if(len(x)==l):
            break
        txt=x
        
    print(x)

testcases=int(input())
for i in range(testcases):
    s=input()
    x=s.find("abc")
    while(x!=-1):
        s=s.replace("abc", "")
        x=s.find("abc")
    print(s)

for t in range(int(input())) :
    x = input()
    while 'abc' in x :
        x = x.replace('abc','')
    print(x)

# cook your dish here
for u in range(int(input())):
    s=input()
    a=s
    for i in range(len(s)//2):
        a=a.replace("abc","")
    print(a)    

try:
    for _ in range(int(input())):
        s=input()
        t="abc"
        if len(s)<=2:
            print(s)
            continue
        if len(s)==3 and s==t:
            print('')
            continue
        i=0
        while i<len(s)-3+1 and len(s)>=3:
            if s[i:i+3]==t:
                s=s[:i]+s[i+3:]
                i=0
            else:
                i+=1
        print(s)
            
except:
    pass

t1 = int(input())
for i in range(t1):
    s1 = input()
    while("abc" in s1):
        s1 = s1.replace("abc","")
    print(s1)

# # cook your dish here
# import string
# t= int(input())
# for i in range(t):
#     str_ = input()
    
#     while True:
#         for j in range(0, len(str_)-2):
#             if (str_[j]+str_[j+1]+str_[j+2]=="abc"):
#                 str_.replace(str[j], "")
#                 str_.replace(str[j+1], "")
#                 str_.replace(str[j+2], "")
#             else:
#                 continue
#         if 'abc' not in str_:
#             break
#         else:
#             continue
#     print(str_)


t = int(input())
for i in range(t):
    str_ = input()
    while True:
        if 'abc' in str_:
            str_= str_.replace('abc', '')
        else:
            break
    print(str_)


T = int(input())
for i in range(T):
  string = input().lower()
  pos = string.find('abc')
  while pos != -1:
    string = string.replace("abc","")
    pos = string.find('abc')
  print(string)# cook your dish here


# cook your dish here
def Solve4():
    a = input()
    x = len(a)
    while "abc" in a:
        for i in range(x-3):
            if a[i:i+3]=='abc':
                a = a[:i] + a[i+3:]
                break
    print(a)



for _ in range(int(input())):
    Solve4()

# cook your dish here
t = int(input())
for i in range(t):
    s = input()
    while "abc" in s: s = s.replace("abc","")
    print(s)

# cook your dish here
t=int(input())
for _ in range(t):
    s=list(input())
    l=[]
    for i in range(len(s)):
        if(len(l)<2):
            l.append(s[i])
        elif(s[i]=='c' and len(l)>=2 and l[-1]=='b' and l[-2]=='a'):
            l.pop()
            l.pop()
        else:
            l.append(s[i])
    print(''.join(l))


try:
    t=int(input())
    for _ in range(t):
        s=list(input())
        i=0
        le=len(s)
        while(i<le-2):
            if i<0:
                i=0
            if le<3:
                break
            if s[i]=="a" and s[i+1]=="b" and s[i+2]=="c":
                s.pop(i)
                s.pop(i)
                s.pop(i)
                i-=3
                le-=3
                continue
            i+=1
        for ch in s:
            print(ch,end="")
        print()
except EOFError:
    pass

# cook your dish here
t = int(input())
for _ in range(t):
    s = input()
    while s.find("abc") != -1:
        s = s.replace("abc","")
    print(s)


# cook your dish here
t = int(input())
for _ in range(t):
    s = input()
    while s.find("abc") != -1:
        s = s.replace("abc","")
    print(s)


# cook your dish here
t=int(input())
while t:
    t-=1
    
    s= str(input())
    
    while (len(s)>0 and  s.find('abc')!=-1):
        s=s.replace('abc','')
    
    print(s)
    


for t in range(int(input())):
    a=input()
    s=''
    for i in a:
        s+=i
        if i=='c':
            if 'abc' in s:
                s=s[:len(s)-3]
    print(s)

# cook your dish here
for t in range(int(input())):
    str1 = input()
    new = str1.replace('abc', '')
    while new != str1:
        str1 = new
        new = str1.replace('abc', '')
    print(str1)


# cook your dish here
try:
    t = int(input())
    for _ in range(t):
        N = input()
        for i in range(len(N)):
            N = N.replace('abc', '')
        print(N)         
except:
    pass


for _ in range(int(input())):
    s=input()
    x='abc'
    while x in s:
        s=s.replace('abc','')
    print(s)    

for _ in range(int(input())):
    has = input()
    while "abc" in has:
        has = has.replace("abc", "")
    print(has)

t = int(input())
for i in range(t):
    s = input()
    while("abc" in s):
        s = s.replace("abc","")
    print(s)

# cook your dish here
for i in range(int(input())):
    n=input()
    co=n.count('abc')
    while(co!=0):
        n=n.replace('abc','')
        co=n.count('abc')
    print(n)

for _ in range(int(input())):
    string=str(input())
    target="abc"
    while(target in string):
        start=string.find(target)
        string=string[:start]+string[start+3:]

    print(string)


# cook your dish here

t = int(input())

while t:
    s = input()
    
    while 'abc' in s:
        s = s.replace('abc', '')
        # print(s)
        
    print(s)
    
    
    t -= 1