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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.t: A = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

g = A("g")
i = B("i")
d = C("d")
k = D("k")
j = E("j")
e = B("e")
a = A("a")
h = D("h")
m = C("m")

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: B = None
        self.t: A = None
        self.p: B = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: B = None
        self.o: D = None
        self.txt = txt

g = A("g")
i = B("i")
d = C("d")
k = D("k")
j = E("j")
e = B("e")
a = A("a")
h = D("h")
m = C("m")

g.u = i
g.z = h
g.o = d
i.o = j
d.o = i
d.w = i
d.p = i
d.t = g
d.v = j
k.y = d
k.p = j
k.r = i
j.w = e
j.s = e
j.o = h
e.o = j
a.u = i
a.z = h
a.o = m
h.y = d
h.p = j
h.r = e
m.o = e
m.p = e
m.w = i
m.t = a
m.v = j
assert e.o.o.y.v.o.p.w.o.txt == "j"