class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: E = None
        self.s: E = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

e.v = b
e.r = b
e.o = n
e.s = n
e.q = f
a.s = i
a.z = h
a.r = h
a.w = b
a.t = e
h.r = i
b.w = n
b.t = m
b.v = l
b.s = i
b.o = a
f.v = e
n.v = i
m.r = i
l.v = i
i.v = b
i.r = b
i.o = n
i.q = n
i.s = l
assert b.o.r.r.s.v.s.v.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: E = None
        self.s: E = None
        self.r: D = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

e.v = b
e.r = b
e.o = n
e.s = n
e.q = f
a.s = i
a.z = h
a.r = h
a.w = b
a.t = e
h.r = i
b.w = n
b.t = m
b.v = l
b.s = i
b.o = a
f.v = e
n.v = i
m.r = i
l.v = i
i.v = b
i.r = b
i.o = n
i.q = n
i.s = l
assert b.o.r.r.s.v.s.v.s.v.txt == "i"