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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.s: D = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.y: C = None
        self.txt = txt

l = A("l")
a = B("a")
j = C("j")
n = D("n")
g = E("g")
e = A("e")
m = D("m")
h = B("h")

l.x = g
l.v = e
l.o = m
a.z = m
j.x = g
j.q = e
j.v = e
j.s = n
j.z = n
n.z = e
n.w = g
n.s = h
n.y = j
g.r = h
g.z = e
g.y = j
e.x = g
e.v = l
e.o = n
m.z = e
m.w = g
m.s = a
m.y = j
h.z = m
assert e.x.z.o.w.r.txt == "
class A:
    def __init__(self, txt: str):
        self.x: E = None
        self.v: A = None
        self.o: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.s: D = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: E = None
        self.s: B = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.y: C = None
        self.txt = txt

l = A("l")
a = B("a")
j = C("j")
n = D("n")
g = E("g")
e = A("e")
m = D("m")
h = B("h")

l.x = g
l.v = e
l.o = m
a.z = m
j.x = g
j.q = e
j.v = e
j.s = n
j.z = n
n.z = e
n.w = g
n.s = h
n.y = j
g.r = h
g.z = e
g.y = j
e.x = g
e.v = l
e.o = n
m.z = e
m.w = g
m.s = a
m.y = j
h.z = m
assert e.x.z.o.w.r.txt == "h"