def remove_adjacent_pair(s):
print(s)
i = 1
while i < len(s):
if (s[i] is s[i - 1]):
s = s.replace(s[i - 1], '', 2)
i = 1
print(len(s))
print(s)
i = i + 1
return s;
s = "aabcccdeeffffgac";
s = remove_adjacent_pair(s)
print(s);
'''
run:
aabcccdeeffffgac
14
bcccdeeffffgac
12
bcdeeffffgac
10
bcdffffgac
8
bcdffgac
6
bcdgac
bcdgac
'''