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

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

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

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

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

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

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

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

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

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

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

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

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

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

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