
# slower version:

s = input()
for i in range(len(s)):
  if i%2 == 0:
    print(s[i], end = '')


# optimized version of the same code:

s = input()
ans = ''
for i in range(len(s)):
  if i % 2 == 0:
    ans += s[i]
print(ans)



# slower version:

import sys

input = sys.stdin.readline

n = int(eval(input()))

v = [[0]+[]*(n+1) for i in range(n+1)]

for i in range(n-1):

    a,b,c = list(map(int,input().split()))

    v[a].append([b,c])

    v[b].append([a,c])



q,k = list(map(int,input().split()))

l = [k]

while l:

    now = l.pop()

    for i in v[now][1:]:

        if v[i[0]][0] == 0:

            v[i[0]][0] = i[1]+v[now][0]

            l.append(i[0])



for i in range(q):

    x,y = list(map(int,input().split()))

    print((v[x][0]+v[y][0]))

# optimized version of the same code:

import sys

def main():

    input = sys.stdin.readline

    n = int(eval(input()))

    v = [[0]+[]*(n+1) for i in range(n+1)]

    for i in range(n-1):

        a,b,c = list(map(int,input().split()))

        v[a].append([b,c])

        v[b].append([a,c])



    q,k = list(map(int,input().split()))

    l = [k]

    while l:

        now = l.pop()

        for i in v[now][1:]:

            if v[i[0]][0] == 0:

                v[i[0]][0] = i[1]+v[now][0]

                l.append(i[0])



    for i in range(q):

        x,y = list(map(int,input().split()))

        print((v[x][0]+v[y][0]))



if __name__ == '__main__':

    main()
import sys

input = sys.stdin.readline
n = int(eval(input()))
v = [[0] + [] * (n + 1) for i in range(n + 1)]
for i in range(n - 1):
    a, b, c = list(map(int, input().split()))
    v[a].append([b, c])
    v[b].append([a, c])
q, k = list(map(int, input().split()))
l = [k]
while l:
    now = l.pop()
    for i in v[now][1:]:
        if v[i[0]][0] == 0:
            v[i[0]][0] = i[1] + v[now][0]
            l.append(i[0])
for i in range(q):
    x, y = list(map(int, input().split()))
    print((v[x][0] + v[y][0]))

import sys


def main():
    input = sys.stdin.readline
    n = int(eval(input()))
    v = [[0] + [] * (n + 1) for i in range(n + 1)]
    for i in range(n - 1):
        a, b, c = list(map(int, input().split()))
        v[a].append([b, c])
        v[b].append([a, c])
    q, k = list(map(int, input().split()))
    l = [k]
    while l:
        now = l.pop()
        for i in v[now][1:]:
            if v[i[0]][0] == 0:
                v[i[0]][0] = i[1] + v[now][0]
                l.append(i[0])
    for i in range(q):
        x, y = list(map(int, input().split()))
        print((v[x][0] + v[y][0]))


if __name__ == "__main__":
    main()

-input = sys.stdin.readline -n = int(eval(input())) -v = [[0] + [] * (n + 1) for i in range(n + 1)] -for i in range(n - 1): -    a, b, c = list(map(int, input().split())) -    v[a].append([b, c]) -    v[b].append([a, c]) -q, k = list(map(int, input().split())) -l = [k] -while l: -    now = l.pop() -    for i in v[now][1:]: -        if v[i[0]][0] == 0: -            v[i[0]][0] = i[1] + v[now][0] -            l.append(i[0]) -for i in range(q): -    x, y = list(map(int, input().split())) -    print((v[x][0] + v[y][0])) + +def main(): +    input = sys.stdin.readline +    n = int(eval(input())) +    v = [[0] + [] * (n + 1) for i in range(n + 1)] +    for i in range(n - 1): +        a, b, c = list(map(int, input().split())) +        v[a].append([b, c]) +        v[b].append([a, c]) +    q, k = list(map(int, input().split())) +    l = [k] +    while l: +        now = l.pop() +        for i in v[now][1:]: +            if v[i[0]][0] == 0: +                v[i[0]][0] = i[1] + v[now][0] +                l.append(i[0]) +    for i in range(q): +        x, y = list(map(int, input().split())) +        print((v[x][0] + v[y][0])) + + +if __name__ == "__main__": +    main()