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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.r: B = None
        self.w: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

i.o = m
i.x = m
i.t = b
i.v = j
g.y = m
g.x = m
g.p = m
g.r = a
g.w = a
j.q = b
j.y = a
j.u = g
k.w = j
k.t = i
k.y = i
k.s = b
k.x = f
f.o = i
f.r = j
m.o = i
m.r = c
c.q = k
c.y = g
c.u = g
a.y = f
a.x = f
a.r = g
a.w = g
a.p = m
b.w = j
b.t = i
b.y = i
b.s = k
b.x = f
assert a.r.x.o.v.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: D = None
        self.x: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.r: B = None
        self.w: B = None
        self.p: E = None
        self.txt = txt

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

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

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

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

i.o = m
i.x = m
i.t = b
i.v = j
g.y = m
g.x = m
g.p = m
g.r = a
g.w = a
j.q = b
j.y = a
j.u = g
k.w = j
k.t = i
k.y = i
k.s = b
k.x = f
f.o = i
f.r = j
m.o = i
m.r = c
c.q = k
c.y = g
c.u = g
a.y = f
a.x = f
a.r = g
a.w = g
a.p = m
b.w = j
b.t = i
b.y = i
b.s = k
b.x = f
assert a.r.x.o.v.q.txt == "b"