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

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

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

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

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

m = A("m")
h = B("h")
e = C("e")
a = D("a")
n = E("n")
l = D("l")

m.v = e
m.z = e
m.w = h
m.u = n
h.v = m
h.z = m
h.y = e
h.t = e
e.p = l
e.z = l
e.q = m
e.t = n
e.y = a
a.x = e
a.y = e
a.t = m
a.v = h
a.r = n
n.v = l
l.x = e
l.y = e
l.t = m
l.v = h
l.r = n
assert e.t.v.t.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: C = None
        self.w: B = None
        self.u: E = None
        self.txt = txt

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

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

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

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

m = A("m")
h = B("h")
e = C("e")
a = D("a")
n = E("n")
l = D("l")

m.v = e
m.z = e
m.w = h
m.u = n
h.v = m
h.z = m
h.y = e
h.t = e
e.p = l
e.z = l
e.q = m
e.t = n
e.y = a
a.x = e
a.y = e
a.t = m
a.v = h
a.r = n
n.v = l
l.x = e
l.y = e
l.t = m
l.v = h
l.r = n
assert e.t.v.t.u.v.txt == "l"