class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: E = None
        self.y: D = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

i.o = l
i.y = l
i.s = m
i.z = k
j.v = m
j.o = m
j.y = k
j.t = f
k.s = a
k.o = m
l.o = f
l.v = m
m.t = j
m.s = i
m.w = i
m.u = i
m.r = i
a.v = m
a.o = m
a.y = k
a.t = f
f.v = m
f.o = m
f.y = k
f.t = j
assert l.o.y.s.y.s.txt == "a"