class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: B = None
        self.o: A = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.w: A = None
        self.y: C = None
        self.txt = txt

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

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

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

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

l.u = k
l.s = a
l.x = a
l.o = j
a.q = i
a.x = h
a.w = j
a.y = k
k.q = g
k.y = g
k.p = m
k.u = m
h.o = m
h.w = k
g.s = a
g.t = j
g.p = h
i.s = a
i.t = j
i.p = h
j.u = k
j.s = m
j.o = l
j.x = a
m.q = g
m.x = h
m.w = l
m.y = k
assert i.t.x.y.p.x.o.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: B = None
        self.o: A = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: D = None
        self.w: A = None
        self.y: C = None
        self.txt = txt

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

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

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

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

l.u = k
l.s = a
l.x = a
l.o = j
a.q = i
a.x = h
a.w = j
a.y = k
k.q = g
k.y = g
k.p = m
k.u = m
h.o = m
h.w = k
g.s = a
g.t = j
g.p = h
i.s = a
i.t = j
i.p = h
j.u = k
j.s = m
j.o = l
j.x = a
m.q = g
m.x = h
m.w = l
m.y = k
assert i.t.x.y.p.x.o.w.u.txt == "k"