class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: G = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: A = None
        self.o: H = None
        self.w: H = None
        self.p: E = None
        self.r: C = None
        self.y: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.o: A = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: A = None
        self.o: H = None
        self.w: H = None
        self.p: E = None
        self.r: C = None
        self.y: F = None
        self.q: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: B = None
        self.o: A = None
        self.x: F = None
        self.txt = txt

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

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