class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.r: F = None
        self.p: E = None
        self.q: C = None
        self.w: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.y: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.y: A = None
        self.r: B = None
        self.p: A = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: D = None
        self.z: F = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: A = None
        self.o: D = None
        self.t: A = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.y: E = None
        self.t: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.y: A = None
        self.r: B = None
        self.p: A = None
        self.z: E = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: D = None
        self.z: F = None
        self.u: C = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: A = None
        self.o: D = None
        self.t: A = None
        self.p: D = None
        self.z: E = None
        self.txt = txt

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

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