Harryxun/sft_time huggingface dataset:
### BUGGY CODE ###

import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

A, B, K =  map(int, sys.stdin.readline().split())
L = [x for x in range(A, B + 1)]
X = L[:K] + L[len(L) - K::]
X = [x for x in range(A, min(A + K, B + 1))] + [x for x in range(max(B - K + 1, A), B + 1)]
for x in sorted(list(set(X))):
    print(x)

### FIXED CODE ###

import sys
import math
from fractions import gcd
# import queue
# from collections import Counter
# from itertools import accumulate
# from functools import reduce

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""
# 標準入力取得
## 文字列
 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())

## 数値
 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

A, B, K =  map(int, sys.stdin.readline().split())
X = [x for x in range(A, min(A + K, B + 1))] + [x for x in range(max(B - K + 1, A), B + 1)]
for x in sorted(list(set(X))):
    print(x)
### BUGGY CODE ###

import numpy as np
N=int(input())

sum_=0
tmp=np.array([0 for _ in range(20)])
A =list(map(int,input().split()))
i=0
biA=np.array([[0 for _ in range(20)] for _ in range(N)])
ans=0
for j in range(N):
    k=0
    while A[j]!=0:
        biA[j][k]=A[j]%2
        A[j]//=2
        k+=1
    tmp+=biA[j]
    while 2 in tmp:
        tmp-=biA[i]
        i+=1
    ans+=j-i+1
print(ans)

### FIXED CODE ###

N=int(input())

sum_=0
A =list(map(int,input().split()))
j=0
ans=0
sum_=0
for i in range(N):
    k=0
    while j<N and sum_+A[j]==sum_^A[j]:
        sum_+=A[j]
        ans+=j-i+1
        j+=1
    sum_-=A[i]
print(ans)
### BUGGY CODE ###

N, W = map(int, input().split())
WV = [list(map(int, input().split())) for _ in range(N)]

dp = [0] * (W + 1)
for n in range(N):
	w, v = WV[n]
	for sumw in range(W, w - 1, -1):
		#dp[sumw] = max([dp[sumw], dp[sumw - w] + v])
		if dp[sumw] < dp[sumw - w] + v:
			dp[sumw] = dp[sumw - w] + v
	#for x in dp:
	#	print("{:4d}".format(x), end="")
	#print()
print(max(dp))


### FIXED CODE ###

def dp():
  N, W = map(int, input().split())
  WV = (map(int, input().split()) for _ in range(N))

  DP = [0] * (W+1)
  for w, v in WV:
    for j in range(W, w-1, -1):
      dp = DP[j-w] + v 
      if DP[j] < dp:
        DP[j] = dp
  return max(DP)
print(dp())
### BUGGY CODE ###

n = int(input())

ans = 0
for i in range(1, n + 1):
    t = int(n / i)
    ans += i * t * (t + 1) // 2

print(ans)


### FIXED CODE ###

n = int(input())

ans = 0
for i in range(1, n + 1):
    t = int(n / i)
    ans += i * t * (t + 1) // 2

print(ans)
### BUGGY CODE ###

import sys
n = int(input())
print(0, flush=True)
s = input()
if s == "Vacant":
    sys.exit()
l = 0
r = n
ls = s
rs = s

def nibun(l, r, m, ls, rs, s):
    if ((m-l) % 2 == 0 and ls == s) or\
        ((m-l) % 2 == 1 and ls != s):
        return 1
    else:
        return 0

for ii in range(21):
    m = (l+r)//2
    print(m, flush=True)
    s = input()
    if s == "Vacant":
        break
    if nibun(l, r, m, ls, rs, s) == 0:
        r = m
        rs = s
    else:
        l = m
        ls = s

### FIXED CODE ###

import sys
n = int(input())
print(0, flush=True)
s = input()
if s == "Vacant":
    sys.exit()
l = 0
r = n
ls = s
rs = s

def nibun(l, r, m, ls, rs, s):
    if ((m-l) % 2 == 0 and ls == s) or\
        ((m-l) % 2 == 1 and ls != s):
        return 1
    else:
        return 0

for ii in range(21):
    m = (l+r)//2
    print(m, flush=True)
    s = input()
    if s == "Vacant":
        break
    if nibun(l, r, m, ls, rs, s) == 0:
        r = m
        rs = s
    else:
        l = m
        ls = s
### BUGGY CODE ###

N, M, Q = map(int, input().split())  # N個の駅, M本の列車, Q個のクエリ
lines = [list(map(int, input().split())) for _ in range(M)]
query = [list(map(int, input().split())) for _ in range(Q)]
for p, q in query:
    # pが始点, qが終点
    ans = 0
    for l, r in lines:
        if l >= p and r <= q:
            ans += 1
    print(ans)


### FIXED CODE ###

N, M, Q = map(int, input().split())  # N個の駅, M本の電車, Q個のクエリ
X = [[0]*501 for _ in range(501)]
C = [[0]*501 for _ in range(501)]
for _ in range(M):
    left, right = map(lambda x: int(x)-1, input().split())
    X[left][right] += 1

for i in range(N):
    for j in range(N):
        # 累積和
        C[i][j] = C[i][j-1] + X[i][j]  # 横方向に累積されていく
for _ in range(Q):
    p, q = map(lambda x: int(x)-1, input().split())
    ans = 0
    for i in range(p, q+1):
        ans += C[i][q] - C[i][p-1]
    print(ans)
### BUGGY CODE ###

from heapq import *
from collections import defaultdict
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    inf = 10 ** 12
    n = int(input())
    aa = LLI(n)
    hp = []
    for v in range(n):
        for u in range(v):
            heappush(hp, [aa[u][v], u, v])
    ans = 0
    first = [True] * n
    bb = [[inf] * n for _ in range(n)]
    for i in range(n):
        bb[i][i] = 0
    while hp:
        d, u, v = heappop(hp)
        if first[u] or first[v]:
            bb[u][v] = bb[v][u] = d
            ans += d
            first[u], first[v] = False, False
        else:
            min_d = inf
            for w in range(n):
                duv = bb[u][w] + bb[w][v]
                if duv < min_d: min_d = duv
            if d < min_d:
                bb[u][v] = bb[v][u] = d
                ans += d
            elif d > min_d:
                print(-1)
                exit()
    #p2D(bb)
    print(ans)

main()


### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

n=int(input())
aa=LLI(n)

def main():
    ans=sum(sum(ar) for ar in aa)//2
    fin=set()
    for w in range(n):
        aaw=aa[w]
        for u in range(n):
            if u==w:continue
            aau=aa[u]
            for v in range(u):
                if v==w:continue
                d=aau[w]+aaw[v]
                if d<aau[v]:
                    print(-1)
                    exit()
                if d==aau[v] and (u,v) not in fin:
                    ans-=d
                    fin.add((u,v))
    print(ans)

main()
### BUGGY CODE ###

N,P = map(int, input().split())

i = 1
ans = 1
R = int(P**(1/N)) + 1
if N > 2:
	for l in range(R): 
		if P % i**N == 0:
			ans = i
		i += 1
elif N == 2:
	for l in range(R):
		if P % (R-l)**N == 0:
			ans = R-l
			break
		i += 1
else:
	ans = P
print(ans)


### FIXED CODE ###

N,P = map(int, input().split())

ans = 1
R = int(P**(1/N)) + 1
if N == 1:
	ans = P
elif N > 40:
	ans = 1
else:
	for l in range(R):
		if P % (R-l)**N == 0:
			ans = R-l
			break
print(ans)
### BUGGY CODE ###

n, W = map(int, input().split())
w, v = [], []
for _ in range(n):
    a, b = map(int, input().split())
    w.append(a)
    v.append(b)

dp = [[0 for _ in range(W+1)] for _ in range(n+1)]
for i in range(1, n+1):
    for j in range(0, W+1):
        if j - w[i-1] >= 0:
            dp[i][j] = max(dp[i-1][j], dp[i-1][j-w[i-1]] + v[i-1])
        else:
            dp[i][j] = dp[i-1][j]

print(dp[n][W])

### FIXED CODE ###

n, W = map(int, input().split())
w, v = [], []
for _ in range(n):
    a, b = map(int, input().split())
    w.append(a)
    v.append(b)

dp = [[0 for _ in range(W+1)] for _ in range(n+1)]
for i in range(1, n+1):
    for j in range(0, W+1):
        if j - w[i-1] >= 0:
            dp[i][j] = max(dp[i-1][j], dp[i-1][j-w[i-1]] + v[i-1])
        else:
            dp[i][j] = dp[i-1][j]

print(dp[n][W])
### BUGGY CODE ###

N = int(input())
nums = [i for i in map(int, input().split(" "))]

target_count = 0
for index in range(N):
    target = nums[index]
    divisible_count = 0
    for num in nums:
        residue = target % num
        if residue ==0:
            divisible_count +=1
    if divisible_count==1:
        target_count+=1

print(target_count)

### FIXED CODE ###

N = int(input())
nums = [i for i in map(int, input().split())]
nums = sorted(nums)
max = nums[-1]
dp = [1]*(max+1)
ans = 0

for i in range(len(nums)-1):
    p = nums[i]
    if dp[p] ==1:
        for q in range(max//p+1):
            dp[p*q]=0
        if nums[i] != nums[i+1]:
            ans+=1
if dp[max]==1:
    ans+=1
print(ans)
### BUGGY CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7

N = int(input())
INF = 10**10
cost = [[INF]*N for _ in range(N)]

for i in range(N):
    C = list(map(int, input().split()))
    for j in range(N):
        cost[i][j] = C[j]
    cost[i][i] = INF

ans = 0
for j in range(N):
    for k in range(j+1,N):
        mn = INF
        for i in range(N):
            mn = min(mn, cost[j][i]+cost[i][k])    
        if (cost[j][k] > mn):
            print (-1)
            exit()
        elif (cost[j][k] < mn):
            ans += cost[j][k]                      
print (ans)

### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7

N = int(input())
INF = 10**10
cost = [[INF]*N for _ in range(N)]

for i in range(N):
    C = list(map(int, input().split()))
    for j in range(N):
        cost[i][j] = C[j]
    cost[i][i] = INF

ans = 0
for j in range(N):
    for k in range(j+1,N):
        mn = INF
        for i in range(N):
            mn = min(mn, cost[j][i]+cost[i][k])    
        if (cost[j][k] > mn):
            print (-1)
            exit()
        elif (cost[j][k] < mn):
            ans += cost[j][k]                      
print (ans)
### BUGGY CODE ###

mod = 10 ** 9 + 7

S = input()

dp = [0] * 13

dp[0] = 1

l = len(S)

for i in S:
    nextdp = [0] * 13
    if i == "?":
        for k in range(10):
            for j in range(13):
                nextdp[((j * 10) + k) % 13] += dp[j]
                # nextdp[((j * 10) + k) % 13] %= mod

    else:
        k = int(i)
        for j in range(13):
            nextdp[((j * 10) + k) % 13] += dp[j]
            # nextdp[((j * 10) + k) % 13] %= mod

    for i in range(13):
        dp[i] = nextdp[i] % mod

print(dp[5])

### FIXED CODE ###

mod = 10 ** 9 + 7

S = input()

dp = [0] * 13

dp[0] = 1

l = len(S)

for i in S:
    nextdp = [0] * 13
    if i == "?":
        for k in range(10):
            for j in range(13):
                nextdp[((j * 10) + k) % 13] += dp[j]
                # nextdp[((j * 10) + k) % 13] %= mod

    else:
        k = int(i)
        for j in range(13):
            nextdp[((j * 10) + k) % 13] += dp[j]
            # nextdp[((j * 10) + k) % 13] %= mod

    dp = [nextdp[i] % mod for i in range(13)]

    # for i in range(13):
    #     dp[i] = nextdp[i] % mod

print(dp[5])
### BUGGY CODE ###

import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    INF = 10**18
    MX = 10**13
    MY = 10**3
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())

    N,M,L = LI()
    road = [[0] * N for _ in range(N)]
    for _ in range(M):
        a,b,c = LI()
        if c <= L:
            road[a-1][b-1] = c
            road[b-1][a-1] = c

    town = [[-1 for _ in range(N)] for _ in range(N)]

    for s in range(N):

        q = [s]
        town[s][s] = s
        while q:
            z = heapq.heappop(q)
            u = z % MY
            if town[s][u] < z: continue
            n = z // MX
            w = (z % MX) // MY
            for v in range(N):
                c = road[u][v]
                if c == 0: continue
                nn = n
                nw = w + c
                if nw > L:
                    nw = c
                    nn += 1

                nz = nn * MX + nw * MY + v
                if town[s][v] < 0 or town[s][v] > nz:
                    town[s][v] = nz
                    heapq.heappush(q,nz)

    Q = NI()
    for _ in range(Q):
        s,t = LI()
        if town[s-1][t-1] < 0:
            print(-1)
        else:
            print(town[s-1][t-1]//MX)


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys,queue,math,copy,itertools,bisect,collections,heapq


def wf(d,n):
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j], d[i][k] + d[k][j])
    return d

def main():
    INF = 10**18
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())

    N,M,L = LI()
    road = [[INF] * N for _ in range(N)]
    for _ in range(M):
        a,b,c = LI()
        if c <= L:
            road[a-1][b-1] = c
            road[b-1][a-1] = c

    road = wf(road,N)


    gas = [[INF] * N for _ in range(N)]
    for i in range(N):
        for j in range(N):
            if road[i][j] <= L:
                gas[i][j] = 1

    gas = wf(gas,N)

    Q = NI()
    for _ in range(Q):
        s,t = LI()
        if gas[s-1][t-1] == INF:
            print(-1)
        else:
            print(gas[s-1][t-1]-1)


if __name__ == '__main__':
    main()
### BUGGY CODE ###

import sys
import time
from collections import deque, Counter, defaultdict
#from fractions import gcd
#import bisect
#import heapq
import math
start=time.time()
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
h,w = rl()
s = [list(rs()) for i in range(h)]
u=[[0]*w for i in range(h)]
b=[[0]*w for i in range(h)]
l=[[0]*w for i in range(h)]
r=[[0]*w for i in range(h)]

#縦方向
for i in range(w):
    if s[0][i]==".":
        u[0][i]=1
for i in range(w):
    for j in range(1,h):
        if s[j][i]==".":
            u[j][i]=u[j-1][i]+1
for i in range(w):
    if s[-1][i]==".":
        b[-1][i]=1
for i in range(w):
    for j in range(1,h):
        if s[-j-1][i]==".":
            b[-j-1][i]=b[-j][i]+1            
            

#横方向
for i in range(h):
    if s[i][0]==".":
        l[i][0]=1
for i in range(1,w):
    for j in range(h):
        if s[j][i]==".":
            l[j][i]=l[j][i-1]+1
for i in range(h):
    if s[i][-1]==".":
        r[i][-1]=1
for i in range(1,w):
    for j in range(h):
        if s[j][-i-1]==".":
            r[j][-i-1]=r[j][-i]+1
ans=0
for i in range(w):
    for j in range(h):
        ans=max(u[j][i]+b[j][i]+l[j][i]+r[j][i]-3, ans)
print(ans)            
    

### FIXED CODE ###

import sys
import time
from collections import deque, Counter, defaultdict
#from fractions import gcd
#import bisect
#import heapq
import math
start=time.time()
input = sys.stdin.readline
sys.setrecursionlimit(10**8)
inf = 10**18
MOD = 1000000007
ri = lambda : int(input())
rs = lambda : input().strip()
rl = lambda : list(map(int, input().split()))
h,w = rl()
s = [list(rs()) for i in range(h)]
u=[[0]*w for i in range(h)]
b=[[0]*w for i in range(h)]
l=[[0]*w for i in range(h)]
r=[[0]*w for i in range(h)]

#縦方向
for i in range(w):
    if s[0][i]==".":
        u[0][i]=1
for i in range(w):
    for j in range(1,h):
        if s[j][i]==".":
            u[j][i]=u[j-1][i]+1
for i in range(w):
    if s[-1][i]==".":
        b[-1][i]=1
for i in range(w):
    for j in range(1,h):
        if s[-j-1][i]==".":
            b[-j-1][i]=b[-j][i]+1            
            

#横方向
for i in range(h):
    if s[i][0]==".":
        l[i][0]=1
for i in range(1,w):
    for j in range(h):
        if s[j][i]==".":
            l[j][i]=l[j][i-1]+1
for i in range(h):
    if s[i][-1]==".":
        r[i][-1]=1
for i in range(1,w):
    for j in range(h):
        if s[j][-i-1]==".":
            r[j][-i-1]=r[j][-i]+1
ans=0
for i in range(w):
    for j in range(h):
        ans=max(u[j][i]+b[j][i]+l[j][i]+r[j][i]-3, ans)
print(ans)
### BUGGY CODE ###

n = int(input())
li = list(map(int,input().split()))
for i in range(1,max(li)+1):
    print(li.count(i))
for i in range(n-max(li)):
    print("0")


### FIXED CODE ###

n = int(input())
li = [0]*n
li1 = list(map(int,input().split()))
for i in range(n-1):
    li[li1[i]-1] += 1
for i in range(n):
    print(li[i])
### BUGGY CODE ###

# encoding: utf-8


class Solution:
    @staticmethod
    def binary_search():
        array_length_1 = int(input())
        array_1 = [int(x) for x in input().split()]
        array_length_2 = int(input())
        array_2 = [int(x) for x in input().split()]

        # print(len(set(array_1).intersection(set(array_2))))
        left, right, count = 0, array_length_1, 0
        for each in array_2:
            while left < right:
                mid = (left + right) // 2
                if array_1[mid] == each:
                    count += 1
                elif each < array_1[mid]:
                    right = mid
                else:
                    left = mid + 1

        print(count)


if __name__ == '__main__':
    solution = Solution()
    solution.binary_search()

### FIXED CODE ###

# encoding: utf-8


import sys


class Solution:
    def __init__(self):
        """
        init input array
        """
        self.__input = sys.stdin.readlines()

    @property
    def solution(self):
        length_1 = int(self.__input[0])
        array_1 = list(map(int, self.__input[1].split()))
        length_2 = int(self.__input[2])
        array_2 = list(map(int, self.__input[3].split()))

        assert length_1 == len(array_1) and length_2 == len(array_2)

        count = 0

        for each in array_2:
            if self.binary_search(key=each, array=array_1, array_length=length_1):
                count += 1

        return str(count)

    @staticmethod
    def binary_search(key, array, array_length):
        # print(len(set(array_1).intersection(set(array_2))))
        left, right = 0, array_length
        while left < right:
            mid = (left + right) // 2
            if key == array[mid]:
                return True
            elif key < array[mid]:
                right = mid
            else:
                left = mid + 1
        return False


if __name__ == '__main__':
    case = Solution()
    print(case.solution)
### BUGGY CODE ###

n = int(input())
l = list(map(int, input().split()))
for i in range(int(n/2-1)):
  l.remove(max(l))
  l.remove(min(l))
r = abs(l[1]-l[0])
print(r)

### FIXED CODE ###

n = int(input())
l = sorted(list(map(int, input().split())))
d = int(n / 2)
r = l[d] - l[d-1]
print(r)
### BUGGY CODE ###

n = int(input())
lst = list(map(int, input().split()))

lst2 = [lst[_-1] == min(lst[0:_]) for _ in range(1,n+1)]
print(sum(lst2))

### FIXED CODE ###

n = int(input())
lst = list(map(int, input().split()))

i = 0
mini = n +1
for _ in lst:
    if mini > _:
        mini = _
        i += 1
print(i)
### BUGGY CODE ###

k, s = map(int, input().split())
r = range(0, k + 1)
cnt = 0
for x in r:
    for y in r:
        if x + y > s:
            continue
        for z in r:
            if x + y + z == s:
                cnt += 1

print(cnt)


### FIXED CODE ###

k, s = map(int, input().split())
r = range(0, k + 1)
cnt = 0
for x in r:
    for y in r:
        if s - k <= x + y <= s:
            cnt += 1
print(cnt)
### BUGGY CODE ###

import sys
sys.setrecursionlimit(10000000)

n, q = map(int, input().split())

lv =[[] for _ in range(n)]
ans=[0] * (n)

def dfs(v,p=-1):
    for u in lv[v]:
        if u == p: continue
        ans[u] += ans[v]
        dfs(u,v)

for _ in range(n-1):
    a,b = map(int,input().split())
    lv[a-1].append(b-1)
    lv[b-1].append(a-1)

for _ in range(q):
    p,x = map(int,input().split())
    ans[p-1] += x

dfs(0)

print(*ans)

### FIXED CODE ###

I0 = lambda :map(int,input().split())
I1 = lambda :int(input())
I2 = lambda :list(map(int,input().split()))
#####################################################
 
 
from sys import stdin,setrecursionlimit
#from copy import deepcopy
 
setrecursionlimit(10**6)
input=stdin.readline
 
def dfs(p,father=-1):
    for i in tree[p]:
        if i == father:
            continue
        counter[i]+=counter[p]
        dfs(i,p)
 
n ,q = I0()
counter = [0]*n
tree = [[] for i in range(n)]
for i in range(n-1):
    a,b=I0()
    tree[a-1].append(b-1)
    tree[b-1].append(a-1)
 
for i in range(q):
    p,x = I0()
    counter[p-1]+=x
    
 
dfs(0)
 
print(*counter)
### BUGGY CODE ###

N=int(input())
E=[[] for _ in range(N)]
for _ in range(N-1):
    A,B=map(int,input().split())
    E[A-1].append(B-1)
    E[B-1].append(A-1)
MOD=10**9+7

#dp=子ノードの数+1(自分)
root=0
dp=[1]*N
parent=[0]*N
order=[]
def dfs():
    parent[root]=root
    stack=[root]
    while stack:
        node=stack.pop()
        order.append(node)
        for ss in E[node]:
            if parent[node]!=ss:
                stack.append(ss)
                parent[ss]=node

def solve():
    ans=0
    inv2=pow(2,MOD-2,MOD)
    #p0=すべての部分木に黒頂点が1つも含まれない確率
    p0=pow(1<<(N-1),MOD-2,MOD)
    for i in reversed(order):
        if root!=i:
            dp[parent[i]]+=dp[i]
        p=0
        if len(E[i])>=2:
            #p0*(p1-1)=どれか1つの各部分木に黒頂点が1つ以上含まれる確率
            p1=1
            for s in E[i]:
                size=0
                if parent[i]!=s:
                    size=dp[s]
                elif i!=root:
                    size=N-dp[i]
                else:
                    continue
                p1+=(1<<size)-1
                p1%=MOD
            p=1-(p0*p1)
            p%=MOD
            #頂点iが白の確率
            p=p*inv2%MOD
        ans+=p
        ans%=MOD
    print(ans)

dfs()
solve()


### FIXED CODE ###

N=int(input())
E=[[] for _ in range(N)]
for _ in range(N-1):
    A,B=map(int,input().split())
    E[A-1].append(B-1)
    E[B-1].append(A-1)
MOD=10**9+7

#dp=子ノードの数+1(自分)
dp=[1]*N

root=0
parent=[0]*N
order=[]
def dfs():
    parent[root]=root
    stack=[root]
    while stack:
        node=stack.pop()
        order.append(node)
        for ss in E[node]:
            if parent[node]!=ss:
                stack.append(ss)
                parent[ss]=node

pow2=[1]*(N+1)
for i in range(1,len(pow2)):
    pow2[i]=pow2[i-1]*2%MOD

def solve():
    ans=0
    inv2=pow(2,MOD-2,MOD)
    #p0=すべての部分木に黒頂点が1つも含まれない確率
    p0=pow(pow2[N-1],MOD-2,MOD)
    for i in reversed(order):
        if root!=i:
            dp[parent[i]]+=dp[i]
        p=0
        if len(E[i])>=2:
            #p0*(p1-1)=どれか1つの各部分木に黒頂点が1つ以上含まれる確率
            p1=1
            for s in E[i]:
                size=0
                if parent[i]!=s:
                    size=dp[s]
                elif i!=root:
                    size=N-dp[i]
                else:
                    continue
                p1+=pow2[size]-1
            p=1-(p0*p1)
            p%=MOD
        ans+=p
        ans%=MOD
    #頂点iが白の確率
    ans=ans*inv2%MOD
    print(ans)

dfs()
solve()