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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.u: D = None
        self.p: B = None
        self.v: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: A = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: C = None
        self.u: D = None
        self.p: B = None
        self.v: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: A = None
        self.x: D = None
        self.t: E = None
        self.txt = txt

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

h.v = l
h.w = d
k.o = m
k.p = m
k.v = m
k.t = l
k.u = d
n.u = h
d.y = e
d.t = e
d.v = n
a.p = n
a.r = h
a.x = d
a.t = e
e.p = l
e.r = h
e.x = d
e.t = a
m.o = k
m.p = k
m.v = k
m.t = n
m.u = d
i.p = l
i.r = h
i.x = d
i.t = e
l.u = h
g.u = h
assert k.p.v.u.y.txt == "e"