class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: E = None
        self.s: D = None
        self.u: E = None
        self.z: C = 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.z: D = None
        self.u: D = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.x: D = None
        self.v: E = None
        self.w: B = None
        self.txt = txt

n = A("n")
h = B("h")
a = C("a")
g = D("g")
e = E("e")
b = C("b")
l = D("l")
d = E("d")
i = E("i")
f = A("f")

n.w = l
n.s = l
n.p = e
n.u = e
n.z = a
h.z = g
a.z = g
a.u = g
a.o = i
g.t = a
e.z = g
e.x = g
e.p = b
e.v = d
e.w = h
b.z = l
b.u = l
b.o = d
l.t = b
d.z = l
d.x = l
d.p = b
d.v = i
d.w = h
i.z = g
i.p = b
i.x = l
i.v = d
i.w = h
f.w = g
f.s = g
f.p = d
f.u = e
f.z = b
assert l.t.o.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.p: E = None
        self.s: D = None
        self.u: E = None
        self.z: C = 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.z: D = None
        self.u: D = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: C = None
        self.x: D = None
        self.v: E = None
        self.w: B = None
        self.txt = txt

n = A("n")
h = B("h")
a = C("a")
g = D("g")
e = E("e")
b = C("b")
l = D("l")
d = E("d")
i = E("i")
f = A("f")

n.w = l
n.s = l
n.p = e
n.u = e
n.z = a
h.z = g
a.z = g
a.u = g
a.o = i
g.t = a
e.z = g
e.x = g
e.p = b
e.v = d
e.w = h
b.z = l
b.u = l
b.o = d
l.t = b
d.z = l
d.x = l
d.p = b
d.v = i
d.w = h
i.z = g
i.p = b
i.x = l
i.v = d
i.w = h
f.w = g
f.s = g
f.p = d
f.u = e
f.z = b
assert l.t.o.w.z.txt == "g"