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

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

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

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

c = A("c")
d = B("d")
l = C("l")
e = D("e")
b = A("b")
j = B("j")
f = A("f")
k = B("k")
n = D("n")

c.w = j
c.u = l
c.t = e
d.p = f
d.o = l
d.s = n
d.u = n
l.x = d
e.v = n
e.t = n
b.w = k
b.u = l
b.t = n
j.p = b
j.o = l
j.s = n
j.u = e
f.w = d
f.u = l
f.t = e
k.p = b
k.o = l
k.s = n
k.u = n
n.v = e
n.t = e
assert c.w.o.x.o.x.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: C = None
        self.t: D = None
        self.txt = txt

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

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

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

c = A("c")
d = B("d")
l = C("l")
e = D("e")
b = A("b")
j = B("j")
f = A("f")
k = B("k")
n = D("n")

c.w = j
c.u = l
c.t = e
d.p = f
d.o = l
d.s = n
d.u = n
l.x = d
e.v = n
e.t = n
b.w = k
b.u = l
b.t = n
j.p = b
j.o = l
j.s = n
j.u = e
f.w = d
f.u = l
f.t = e
k.p = b
k.o = l
k.s = n
k.u = n
n.v = e
n.t = e
assert c.w.o.x.o.x.u.v.txt == "e"