
# 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:

MOD = 1000000007





S = int(eval(input()))



#dp[i]:=i桁の数列で条件を満たすものの数

dp = [0]*(S+1)



for i in range(3,S+1):

    #dp[i]=sum(dp[0],..,dp[i-3])+1

    for j in range(i-3+1):

        dp[i] = (dp[i]+dp[j])%MOD

    dp[i] = (dp[i]+1)%MOD



print((dp[S]))

# optimized version of the same code:

MOD = 1000000007





S = int(eval(input()))



#dp[i]:=i桁の数列で条件を満たすものの数

dp = [0]*(S+1)

dp_sum = [0]*(S+1)



for i in range(3,S+1):

    #dp[i]=sum(dp[0],..,dp[i-3])+1

    

    dp[i] = (dp_sum[i-3]+1)%MOD

    dp_sum[i] = (dp[i]+dp_sum[i-1])%MOD



print((dp[S]))
MOD = 1000000007
S = int(eval(input()))
# dp[i]:=i桁の数列で条件を満たすものの数
dp = [0] * (S + 1)
for i in range(3, S + 1):
    # dp[i]=sum(dp[0],..,dp[i-3])+1
    for j in range(i - 3 + 1):
        dp[i] = (dp[i] + dp[j]) % MOD
    dp[i] = (dp[i] + 1) % MOD
print((dp[S]))

MOD = 1000000007
S = int(eval(input()))
# dp[i]:=i桁の数列で条件を満たすものの数
dp = [0] * (S + 1)
dp_sum = [0] * (S + 1)
for i in range(3, S + 1):
    # dp[i]=sum(dp[0],..,dp[i-3])+1
    dp[i] = (dp_sum[i - 3] + 1) % MOD
    dp_sum[i] = (dp[i] + dp_sum[i - 1]) % MOD
print((dp[S]))

+dp_sum = [0] * (S + 1) -    for j in range(i - 3 + 1): -        dp[i] = (dp[i] + dp[j]) % MOD -    dp[i] = (dp[i] + 1) % MOD +    dp[i] = (dp_sum[i - 3] + 1) % MOD +    dp_sum[i] = (dp[i] + dp_sum[i - 1]) % MOD