class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: F = None
        self.v: C = None
        self.q: D = None
        self.y: C = None
        self.w: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: E = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

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

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

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

a = A("a")
m = B("m")
k = C("k")
i = D("i")
l = E("l")
g = F("g")
f = E("f")
j = C("j")
n = C("n")
h = C("h")

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

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

class C:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: E = None
        self.t: B = None
        self.s: D = None
        self.txt = txt

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

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

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

a = A("a")
m = B("m")
k = C("k")
i = D("i")
l = E("l")
g = F("g")
f = E("f")
j = C("j")
n = C("n")
h = C("h")

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