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

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

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

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

d = A("d")
h = B("h")
i = C("i")
e = D("e")
m = B("m")
n = C("n")
b = D("b")
j = D("j")
k = A("k")
l = B("l")

d.r = l
d.s = l
d.y = n
d.t = j
h.v = l
i.o = m
i.u = m
i.q = n
i.p = l
e.y = d
e.s = d
e.q = b
m.v = h
n.o = h
n.p = h
n.u = h
n.q = i
b.y = k
b.s = k
b.q = j
j.y = k
j.s = k
j.q = b
k.r = l
k.s = h
k.y = i
k.t = e
l.v = h
assert e.q.y.y.p.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: B = None
        self.y: C = None
        self.t: D = None
        self.txt = txt

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

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

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

d = A("d")
h = B("h")
i = C("i")
e = D("e")
m = B("m")
n = C("n")
b = D("b")
j = D("j")
k = A("k")
l = B("l")

d.r = l
d.s = l
d.y = n
d.t = j
h.v = l
i.o = m
i.u = m
i.q = n
i.p = l
e.y = d
e.s = d
e.q = b
m.v = h
n.o = h
n.p = h
n.u = h
n.q = i
b.y = k
b.s = k
b.q = j
j.y = k
j.s = k
j.q = b
k.r = l
k.s = h
k.y = i
k.t = e
l.v = h
assert e.q.y.y.p.v.v.txt == "l"