class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: E = None
        self.p: F = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

l = A("l")
i = B("i")
b = C("b")
k = D("k")
n = E("n")
f = F("f")

l.r = k
l.x = n
l.p = f
l.z = b
i.z = l
b.o = i
k.o = n
n.w = f
n.u = f
n.z = b
n.y = b
n.s = k
f.r = i
f.v = i
f.u = n
f.o = n
assert k.o.y.o.z.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: E = None
        self.p: F = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

l = A("l")
i = B("i")
b = C("b")
k = D("k")
n = E("n")
f = F("f")

l.r = k
l.x = n
l.p = f
l.z = b
i.z = l
b.o = i
k.o = n
n.w = f
n.u = f
n.z = b
n.y = b
n.s = k
f.r = i
f.v = i
f.u = n
f.o = n
assert k.o.y.o.z.z.o.txt == "i"