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

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

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

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

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

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

h.q = c
h.x = l
a.s = e
a.q = e
a.v = d
a.u = l
l.q = a
b.w = d
b.o = d
b.x = k
b.u = a
b.t = l
i.o = b
i.v = l
i.t = e
d.w = b
d.o = b
d.x = i
d.u = a
d.t = l
g.o = b
g.v = l
g.t = c
c.q = h
c.x = l
k.o = d
k.v = l
k.t = h
e.q = c
e.x = l
assert d.u.u.q.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.q: A = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

h.q = c
h.x = l
a.s = e
a.q = e
a.v = d
a.u = l
l.q = a
b.w = d
b.o = d
b.x = k
b.u = a
b.t = l
i.o = b
i.v = l
i.t = e
d.w = b
d.o = b
d.x = i
d.u = a
d.t = l
g.o = b
g.v = l
g.t = c
c.q = h
c.x = l
k.o = d
k.v = l
k.t = h
e.q = c
e.x = l
assert d.u.u.q.v.t.txt == "l"