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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

b = A("b")
a = B("a")
c = C("c")
f = D("f")
n = E("n")
i = F("i")
e = D("e")

b.t = c
b.s = c
b.o = e
b.u = f
a.o = b
a.q = b
a.x = f
c.r = b
f.s = a
f.z = c
f.y = n
n.t = c
n.p = b
n.s = b
n.x = b
i.w = c
i.x = b
e.s = a
e.z = c
e.y = n
assert n.s.o.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: D = None
        self.s: C = None
        self.u: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: A = None
        self.s: A = None
        self.x: A = None
        self.txt = txt

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

b = A("b")
a = B("a")
c = C("c")
f = D("f")
n = E("n")
i = F("i")
e = D("e")

b.t = c
b.s = c
b.o = e
b.u = f
a.o = b
a.q = b
a.x = f
c.r = b
f.s = a
f.z = c
f.y = n
n.t = c
n.p = b
n.s = b
n.x = b
i.w = c
i.x = b
e.s = a
e.z = c
e.y = n
assert n.s.o.y.t.txt == "c"