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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.r: D = None
        self.z: D = None
        self.p: C = None
        self.txt = txt

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

n = A("n")
m = B("m")
k = C("k")
h = D("h")
e = E("e")
f = A("f")
g = C("g")
b = D("b")

n.t = e
n.z = g
n.p = m
n.w = h
m.w = h
m.z = h
m.p = e
m.o = e
m.s = k
k.v = g
k.w = g
k.r = b
h.s = m
h.u = g
h.r = b
h.z = b
h.p = k
e.o = f
e.r = m
e.y = m
e.x = k
e.v = n
f.t = e
f.z = g
f.p = m
f.w = h
g.v = k
g.w = k
g.r = b
b.s = m
b.u = g
b.r = h
b.z = h
b.p = k
assert e.o.t.v.z.w.v.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.p: B = None
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: C = None
        self.r: D = None
        self.z: D = None
        self.p: C = None
        self.txt = txt

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

n = A("n")
m = B("m")
k = C("k")
h = D("h")
e = E("e")
f = A("f")
g = C("g")
b = D("b")

n.t = e
n.z = g
n.p = m
n.w = h
m.w = h
m.z = h
m.p = e
m.o = e
m.s = k
k.v = g
k.w = g
k.r = b
h.s = m
h.u = g
h.r = b
h.z = b
h.p = k
e.o = f
e.r = m
e.y = m
e.x = k
e.v = n
f.t = e
f.z = g
f.p = m
f.w = h
g.v = k
g.w = k
g.r = b
b.s = m
b.u = g
b.r = h
b.z = h
b.p = k
assert e.o.t.v.z.w.v.w.txt == "k"