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

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.y: E = None
        self.q: E = None
        self.txt = txt

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

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

l.t = e
b.s = i
b.x = i
b.u = e
e.y = c
c.x = k
c.s = k
c.y = k
c.q = k
n.y = e
n.p = e
n.s = k
k.y = e
k.p = e
k.s = n
i.s = b
i.x = b
i.u = e
assert i.u.y.x.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: E = None
        self.y: E = None
        self.q: E = None
        self.txt = txt

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

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

l.t = e
b.s = i
b.x = i
b.u = e
e.y = c
c.x = k
c.s = k
c.y = k
c.q = k
n.y = e
n.p = e
n.s = k
k.y = e
k.p = e
k.s = n
i.s = b
i.x = b
i.u = e
assert i.u.y.x.s.s.txt == "k"