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

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

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

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

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

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

c = A("c")
l = B("l")
k = C("k")
m = D("m")
n = E("n")
f = F("f")

c.t = l
c.s = l
c.u = l
c.o = n
l.p = m
l.y = f
k.o = m
k.t = l
m.x = n
n.s = l
n.o = m
n.u = f
f.o = k
f.v = l
f.t = m
f.y = n
assert c.t.y.y.s.y.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: B = None
        self.u: B = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

c = A("c")
l = B("l")
k = C("k")
m = D("m")
n = E("n")
f = F("f")

c.t = l
c.s = l
c.u = l
c.o = n
l.p = m
l.y = f
k.o = m
k.t = l
m.x = n
n.s = l
n.o = m
n.u = f
f.o = k
f.v = l
f.t = m
f.y = n
assert c.t.y.y.s.y.o.txt == "k"