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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.txt = txt

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

e = A("e")
l = B("l")
j = C("j")
m = D("m")
i = E("i")
c = E("c")
k = B("k")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: C = None
        self.txt = txt

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

e = A("e")
l = B("l")
j = C("j")
m = D("m")
i = E("i")
c = E("c")
k = B("k")

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