class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.w: G = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

j = A("j")
f = B("f")
e = C("e")
h = D("h")
l = E("l")
k = F("k")
a = G("a")
i = H("i")
m = H("m")
c = E("c")

j.q = m
f.x = k
f.z = e
e.o = l
e.u = j
e.t = h
h.x = j
h.t = j
h.z = f
h.w = a
h.u = i
l.o = c
l.p = h
k.p = j
k.o = f
k.u = c
k.x = a
k.r = a
k.t = h
a.y = h
a.s = h
a.o = j
i.z = e
i.y = e
i.u = f
i.r = h
m.z = e
m.y = e
m.u = f
m.r = h
c.o = l
c.p = h
assert k.o.z.o.p.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: B = None
        self.w: G = None
        self.t: A = None
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

j = A("j")
f = B("f")
e = C("e")
h = D("h")
l = E("l")
k = F("k")
a = G("a")
i = H("i")
m = H("m")
c = E("c")

j.q = m
f.x = k
f.z = e
e.o = l
e.u = j
e.t = h
h.x = j
h.t = j
h.z = f
h.w = a
h.u = i
l.o = c
l.p = h
k.p = j
k.o = f
k.u = c
k.x = a
k.r = a
k.t = h
a.y = h
a.s = h
a.o = j
i.z = e
i.y = e
i.u = f
i.r = h
m.z = e
m.y = e
m.u = f
m.r = h
c.o = l
c.p = h
assert k.o.z.o.p.u.txt == "i"