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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

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

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