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

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

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

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

a = A("a")
l = B("l")
c = C("c")
j = D("j")
n = A("n")
i = C("i")
m = D("m")
e = B("e")

a.o = j
l.t = e
l.w = e
l.x = m
c.r = i
c.s = e
c.t = l
j.v = l
j.u = i
n.o = j
i.r = c
i.s = l
i.t = l
m.v = l
m.u = i
e.t = l
e.w = l
e.x = m
assert c.s.x.u.txt == "
class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

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

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

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

a = A("a")
l = B("l")
c = C("c")
j = D("j")
n = A("n")
i = C("i")
m = D("m")
e = B("e")

a.o = j
l.t = e
l.w = e
l.x = m
c.r = i
c.s = e
c.t = l
j.v = l
j.u = i
n.o = j
i.r = c
i.s = l
i.t = l
m.v = l
m.u = i
e.t = l
e.w = l
e.x = m
assert c.s.x.u.txt == "i"