class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.s: A = None
        self.txt = txt

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

b.z = f
b.t = h
b.v = j
l.w = j
l.r = e
f.s = j
f.w = l
f.u = l
f.q = a
f.p = e
n.z = f
e.t = a
e.w = h
e.s = b
j.s = f
j.w = l
j.u = l
j.q = e
j.p = e
a.t = h
a.w = e
a.s = c
k.z = f
c.z = f
c.v = f
c.t = h
h.t = a
h.w = a
h.s = b
assert n.z.p.w.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: E = None
        self.v: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.s: A = None
        self.txt = txt

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

b.z = f
b.t = h
b.v = j
l.w = j
l.r = e
f.s = j
f.w = l
f.u = l
f.q = a
f.p = e
n.z = f
e.t = a
e.w = h
e.s = b
j.s = f
j.w = l
j.u = l
j.q = e
j.p = e
a.t = h
a.w = e
a.s = c
k.z = f
c.z = f
c.v = f
c.t = h
h.t = a
h.w = a
h.s = b
assert n.z.p.w.txt == "h"