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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: D = None
        self.x: D = None
        self.s: C = None
        self.y: A = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

m = A("m")
c = B("c")
d = C("d")
b = D("b")
e = E("e")
a = F("a")
k = E("k")

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: D = None
        self.x: D = None
        self.s: C = None
        self.y: A = None
        self.u: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.txt = txt

m = A("m")
c = B("c")
d = C("d")
b = D("b")
e = E("e")
a = F("a")
k = E("k")

m.t = d
m.p = k
m.r = a
m.o = a
c.w = a
c.r = b
c.x = b
c.u = b
c.s = d
c.y = m
d.o = c
d.p = b
d.w = k
d.y = k
d.t = a
b.o = e
b.z = e
b.p = c
b.r = d
e.q = d
e.z = d
e.o = m
e.p = b
e.v = a
a.y = c
k.q = d
k.z = d
k.o = m
k.p = b
k.v = a
assert c.y.t.o.txt == "c"