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

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

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

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

k = A("k")
n = B("n")
d = C("d")
j = D("j")
e = B("e")
c = D("c")
l = B("l")
g = A("g")
h = C("h")
a = C("a")

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

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

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

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

k = A("k")
n = B("n")
d = C("d")
j = D("j")
e = B("e")
c = D("c")
l = B("l")
g = A("g")
h = C("h")
a = C("a")

k.o = e
k.s = c
k.y = h
k.p = l
n.r = g
n.v = c
n.u = c
d.w = a
d.q = c
j.u = l
e.r = g
e.v = j
e.u = j
c.u = e
l.r = g
l.v = j
l.u = j
g.o = l
g.s = j
g.y = d
g.p = n
h.w = a
h.q = j
a.w = h
a.q = j
assert e.v.u.v.u.txt == "l"