class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.v: B = None
        self.z: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.y: D = None
        self.u: B = None
        self.r: A = None
        self.z: H = None
        self.o: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: C = None
        self.t: D = None
        self.z: B = None
        self.y: A = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: D = None
        self.v: B = None
        self.z: B = None
        self.u: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.y: D = None
        self.u: B = None
        self.r: A = None
        self.z: H = None
        self.o: B = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: B = None
        self.w: C = None
        self.t: D = None
        self.z: B = None
        self.y: A = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: A = None
        self.txt = txt

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

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