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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: A = None
        self.y: C = None
        self.o: C = None
        self.txt = txt

e = A("e")
f = B("f")
k = C("k")
l = D("l")
j = E("j")
h = F("h")

e.p = l
e.z = k
e.x = k
e.u = f
f.w = e
f.x = e
f.v = e
f.s = h
f.o = h
f.u = k
k.t = e
k.y = j
l.t = j
j.z = l
j.x = e
h.q = l
h.t = e
h.y = k
h.o = k
assert h.o.y.z.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: C = None
        self.x: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: A = None
        self.y: C = None
        self.o: C = None
        self.txt = txt

e = A("e")
f = B("f")
k = C("k")
l = D("l")
j = E("j")
h = F("h")

e.p = l
e.z = k
e.x = k
e.u = f
f.w = e
f.x = e
f.v = e
f.s = h
f.o = h
f.u = k
k.t = e
k.y = j
l.t = j
j.z = l
j.x = e
h.q = l
h.t = e
h.y = k
h.o = k
assert h.o.y.z.t.z.txt == "l"