class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: A = None
        self.u: B = None
        self.t: B = None
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: E = None
        self.txt = txt

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

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

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