class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.z: B = None
        self.u: A = None
        self.t: F = None
        self.w: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.q: D = None
        self.o: E = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: B = None
        self.q: D = None
        self.o: E = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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