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

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

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

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

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

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

l = A("l")
h = B("h")
k = C("k")
e = D("e")
b = E("b")
c = F("c")

l.u = e
l.t = c
l.z = c
h.s = e
h.p = e
h.r = e
h.o = c
h.y = b
k.o = l
k.v = l
k.u = e
k.x = h
e.z = k
e.v = b
e.q = h
b.z = l
b.v = l
c.u = b
c.p = k
assert e.z.x.y.v.t.p.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

l = A("l")
h = B("h")
k = C("k")
e = D("e")
b = E("b")
c = F("c")

l.u = e
l.t = c
l.z = c
h.s = e
h.p = e
h.r = e
h.o = c
h.y = b
k.o = l
k.v = l
k.u = e
k.x = h
e.z = k
e.v = b
e.q = h
b.z = l
b.v = l
c.u = b
c.p = k
assert e.z.x.y.v.t.p.txt == "k"