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

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

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

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

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

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

a = A("a")
f = B("f")
l = C("l")
m = D("m")
j = E("j")
k = F("k")

a.z = m
a.t = m
a.o = j
a.u = j
a.r = j
f.u = l
f.q = l
f.s = l
f.t = a
f.p = k
l.t = j
m.u = a
m.o = f
j.s = a
k.s = m
k.u = l
k.x = l
k.y = l
assert j.s.t.o.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.o: E = None
        self.t: D = None
        self.u: E = None
        self.r: E = None
        self.txt = txt

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

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

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

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

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

a = A("a")
f = B("f")
l = C("l")
m = D("m")
j = E("j")
k = F("k")

a.z = m
a.t = m
a.o = j
a.u = j
a.r = j
f.u = l
f.q = l
f.s = l
f.t = a
f.p = k
l.t = j
m.u = a
m.o = f
j.s = a
k.s = m
k.u = l
k.x = l
k.y = l
assert j.s.t.o.p.txt == "k"