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

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: A = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

m = A("m")
e = B("e")
f = C("f")
d = D("d")
n = E("n")
g = F("g")
c = A("c")
h = C("h")
b = C("b")
k = E("k")

m.o = n
e.u = h
e.y = d
e.o = g
e.t = g
e.q = g
e.p = k
f.t = n
f.q = c
f.z = m
f.v = g
d.t = f
n.o = e
n.t = b
n.y = h
n.v = h
n.s = d
n.p = k
g.r = n
g.q = d
g.x = b
c.o = n
h.t = n
h.q = m
h.z = c
h.v = g
b.t = k
b.q = c
b.z = c
b.v = g
k.o = e
k.t = h
k.v = h
k.y = f
k.s = d
k.p = n
assert c.o.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: A = None
        self.z: A = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

m = A("m")
e = B("e")
f = C("f")
d = D("d")
n = E("n")
g = F("g")
c = A("c")
h = C("h")
b = C("b")
k = E("k")

m.o = n
e.u = h
e.y = d
e.o = g
e.t = g
e.q = g
e.p = k
f.t = n
f.q = c
f.z = m
f.v = g
d.t = f
n.o = e
n.t = b
n.y = h
n.v = h
n.s = d
n.p = k
g.r = n
g.q = d
g.x = b
c.o = n
h.t = n
h.q = m
h.z = c
h.v = g
b.t = k
b.q = c
b.z = c
b.v = g
k.o = e
k.t = h
k.v = h
k.y = f
k.s = d
k.p = n
assert c.o.s.t.txt == "f"