class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: C = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

j = A("j")
i = B("i")
k = C("k")
l = D("l")
a = E("a")
c = F("c")

j.z = c
j.w = k
j.o = l
i.s = l
k.o = a
l.t = c
l.q = c
l.y = a
l.o = a
a.u = i
a.t = k
a.r = k
c.w = a
c.q = a
c.x = j
assert k.o.u.s.y.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: C = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: E = None
        self.x: A = None
        self.txt = txt

j = A("j")
i = B("i")
k = C("k")
l = D("l")
a = E("a")
c = F("c")

j.z = c
j.w = k
j.o = l
i.s = l
k.o = a
l.t = c
l.q = c
l.y = a
l.o = a
a.u = i
a.t = k
a.r = k
c.w = a
c.q = a
c.x = j
assert k.o.u.s.y.t.txt == "k"