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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

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

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

a = A("a")
b = B("b")
k = C("k")
d = D("d")
c = E("c")
e = A("e")
i = D("i")
h = C("h")
l = E("l")

a.v = e
b.v = i
b.t = d
b.u = h
b.p = l
b.z = a
k.u = c
k.y = h
k.q = h
d.t = e
d.r = c
d.o = l
d.v = l
d.s = l
c.s = i
e.v = a
i.t = a
i.r = c
i.s = c
i.o = l
i.v = l
h.u = l
h.y = k
h.q = k
l.s = d
assert h.q.q.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

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

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

a = A("a")
b = B("b")
k = C("k")
d = D("d")
c = E("c")
e = A("e")
i = D("i")
h = C("h")
l = E("l")

a.v = e
b.v = i
b.t = d
b.u = h
b.p = l
b.z = a
k.u = c
k.y = h
k.q = h
d.t = e
d.r = c
d.o = l
d.v = l
d.s = l
c.s = i
e.v = a
i.t = a
i.r = c
i.s = c
i.o = l
i.v = l
h.u = l
h.y = k
h.q = k
l.s = d
assert h.q.q.y.u.txt == "c"