N = int(input()) S = list(input()) del S[0] del S[-1] print(''.join(S))