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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.t: C = None
        self.r: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: A = None
        self.t: C = None
        self.r: E = None
        self.x: E = None
        self.txt = txt

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

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

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

g.u = d
g.x = j
g.q = j
g.y = a
d.x = m
d.t = j
f.w = l
f.x = l
f.p = g
f.t = a
f.r = m
i.w = e
i.o = a
m.q = i
m.p = d
e.w = i
e.o = f
b.x = l
b.t = g
a.w = m
a.x = m
a.p = j
a.t = f
a.r = l
j.u = d
j.x = g
j.q = g
j.y = f
l.q = e
l.p = b
assert i.o.r.q.w.w.w.o.r.txt == "l"