class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: E = None
        self.y: B = None
        self.z: A = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

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

e = A("e")
i = B("i")
b = C("b")
k = D("k")
l = E("l")
d = F("d")
a = B("a")

e.s = b
e.q = b
e.y = i
i.w = l
i.s = l
i.y = a
i.z = e
i.v = b
b.u = e
b.q = d
b.t = l
k.s = d
k.o = a
k.z = l
k.v = l
l.y = b
d.o = k
a.w = l
a.s = l
a.y = i
a.z = e
a.v = b
assert l.y.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: B = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: E = None
        self.y: B = None
        self.z: A = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: B = None
        self.z: E = None
        self.v: E = None
        self.txt = txt

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

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

e = A("e")
i = B("i")
b = C("b")
k = D("k")
l = E("l")
d = F("d")
a = B("a")

e.s = b
e.q = b
e.y = i
i.w = l
i.s = l
i.y = a
i.z = e
i.v = b
b.u = e
b.q = d
b.t = l
k.s = d
k.o = a
k.z = l
k.v = l
l.y = b
d.o = k
a.w = l
a.s = l
a.y = i
a.z = e
a.v = b
assert l.y.u.y.txt == "i"