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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: A = None
        self.o: C = None
        self.q: D = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

g = A("g")
e = B("e")
a = C("a")
f = D("f")
i = E("i")
h = F("h")
l = C("l")
n = E("n")
j = D("j")

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: A = None
        self.o: C = None
        self.q: D = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

g = A("g")
e = B("e")
a = C("a")
f = D("f")
i = E("i")
h = F("h")
l = C("l")
n = E("n")
j = D("j")

g.r = l
g.z = l
g.s = j
g.u = j
g.w = h
g.q = e
e.y = g
e.q = n
a.u = h
f.p = g
f.u = g
f.t = n
f.r = e
f.z = e
f.o = a
i.t = j
i.v = g
i.o = a
i.q = f
i.z = n
i.w = n
h.s = a
l.u = h
n.t = j
n.q = j
n.v = g
n.o = l
n.z = i
n.w = i
j.p = g
j.u = g
j.t = i
j.r = e
j.z = e
j.o = a
assert g.z.u.s.u.s.u.txt == "h"