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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: B = None
        self.z: A = None
        self.t: E = None
        self.o: E = None
        self.p: F = None
        self.txt = txt

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

i = A("i")
g = B("g")
j = C("j")
h = D("h")
k = E("k")
b = F("b")
m = F("m")
l = E("l")
d = F("d")
e = E("e")

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

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: B = None
        self.z: A = None
        self.t: E = None
        self.o: E = None
        self.p: F = None
        self.txt = txt

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

i = A("i")
g = B("g")
j = C("j")
h = D("h")
k = E("k")
b = F("b")
m = F("m")
l = E("l")
d = F("d")
e = E("e")

i.o = h
i.x = m
g.u = h
j.x = d
h.o = j
h.q = j
h.v = j
h.t = k
h.p = k
h.r = k
k.x = g
k.y = g
k.z = i
k.t = e
k.o = l
k.p = m
b.z = j
b.t = m
b.w = g
m.z = j
m.t = b
m.w = g
l.x = g
l.y = g
l.z = i
l.t = e
l.o = k
l.p = d
d.z = j
d.t = m
d.w = g
e.x = g
e.y = g
e.z = i
e.t = l
e.o = k
e.p = b
assert d.z.x.t.txt == "m"