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

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

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

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

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

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

b = A("b")
f = B("f")
a = C("a")
m = D("m")
k = E("k")
j = F("j")

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

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

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

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

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

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

b = A("b")
f = B("f")
a = C("a")
m = D("m")
k = E("k")
j = F("j")

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