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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.s: D = None
        self.p: A = None
        self.q: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: H = None
        self.r: H = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: D = None
        self.s: D = None
        self.p: A = None
        self.q: C = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.w: G = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: H = None
        self.r: H = None
        self.q: G = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: C = None
        self.txt = txt

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

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

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