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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

l.v = e
l.q = i
e.r = k
e.q = h
e.y = l
e.o = i
e.t = n
a.w = l
f.v = h
f.t = h
f.u = e
f.q = a
n.r = k
k.r = m
k.q = h
k.y = l
k.o = i
k.t = n
h.v = f
h.t = f
h.u = e
h.q = a
m.r = e
m.q = h
m.y = l
m.o = i
m.t = i
i.r = e
assert e.q.u.q.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

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

l.v = e
l.q = i
e.r = k
e.q = h
e.y = l
e.o = i
e.t = n
a.w = l
f.v = h
f.t = h
f.u = e
f.q = a
n.r = k
k.r = m
k.q = h
k.y = l
k.o = i
k.t = n
h.v = f
h.t = f
h.u = e
h.q = a
m.r = e
m.q = h
m.y = l
m.o = i
m.t = i
i.r = e
assert e.q.u.q.q.txt == "a"