class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: B = None
        self.q: D = None
        self.r: G = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.u: E = None
        self.p: G = None
        self.w: E = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.r: F = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.txt = txt

f = A("f")
k = B("k")
c = C("c")
n = D("n")
h = E("h")
i = F("i")
b = G("b")
g = F("g")
j = B("j")

f.x = g
f.s = k
f.q = n
f.r = b
f.o = c
k.q = f
k.o = f
k.u = h
k.w = h
k.x = h
k.p = b
k.t = c
c.y = j
c.x = j
n.q = i
n.w = i
n.y = j
h.s = f
h.x = f
h.v = f
h.t = k
h.r = i
i.v = g
b.s = n
b.w = f
g.v = i
j.q = f
j.o = f
j.u = h
j.w = h
j.x = h
j.p = b
j.t = c
assert n.y.w.r.v.v.v.v.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: B = None
        self.q: D = None
        self.r: G = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.u: E = None
        self.p: G = None
        self.w: E = None
        self.t: C = None
        self.x: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: B = None
        self.r: F = None
        self.x: A = None
        self.v: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: A = None
        self.txt = txt

f = A("f")
k = B("k")
c = C("c")
n = D("n")
h = E("h")
i = F("i")
b = G("b")
g = F("g")
j = B("j")

f.x = g
f.s = k
f.q = n
f.r = b
f.o = c
k.q = f
k.o = f
k.u = h
k.w = h
k.x = h
k.p = b
k.t = c
c.y = j
c.x = j
n.q = i
n.w = i
n.y = j
h.s = f
h.x = f
h.v = f
h.t = k
h.r = i
i.v = g
b.s = n
b.w = f
g.v = i
j.q = f
j.o = f
j.u = h
j.w = h
j.x = h
j.p = b
j.t = c
assert n.y.w.r.v.v.v.v.v.v.txt == "i"