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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.v: C = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: A = None
        self.y: A = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

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

l.u = e
i.s = e
i.u = e
i.p = l
i.v = k
a.u = c
a.t = e
a.v = k
e.t = c
e.u = l
c.q = e
c.t = e
c.u = l
c.y = l
c.p = i
k.u = c
k.t = e
k.v = a
assert c.u.u.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: A = None
        self.v: C = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: A = None
        self.y: A = None
        self.t: D = None
        self.p: B = None
        self.txt = txt

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

l.u = e
i.s = e
i.u = e
i.p = l
i.v = k
a.u = c
a.t = e
a.v = k
e.t = c
e.u = l
c.q = e
c.t = e
c.u = l
c.y = l
c.p = i
k.u = c
k.t = e
k.v = a
assert c.u.u.t.txt == "c"