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

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

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

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

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

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

l.o = m
l.v = m
l.s = g
l.t = b
j.s = m
j.w = e
j.z = b
m.q = a
m.r = e
h.v = a
h.q = a
h.x = l
h.u = l
b.v = e
e.v = a
e.x = l
e.u = l
e.q = h
g.s = m
g.w = e
g.z = b
a.v = h
a.q = h
a.x = l
a.u = l
i.s = m
i.w = h
i.z = b
assert a.q.v.q.x.t.v.v.txt == "
class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: B = None
        self.v: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

l.o = m
l.v = m
l.s = g
l.t = b
j.s = m
j.w = e
j.z = b
m.q = a
m.r = e
h.v = a
h.q = a
h.x = l
h.u = l
b.v = e
e.v = a
e.x = l
e.u = l
e.q = h
g.s = m
g.w = e
g.z = b
a.v = h
a.q = h
a.x = l
a.u = l
i.s = m
i.w = h
i.z = b
assert a.q.v.q.x.t.v.v.txt == "a"