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

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

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

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

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

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

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

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

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

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

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

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

g.t = k
g.y = j
b.q = e
b.p = k
b.x = k
b.w = m
j.q = a
j.s = a
j.y = n
j.o = n
k.s = n
k.v = e
k.p = m
k.o = g
f.z = e
f.w = m
f.u = j
f.y = g
f.q = g
a.q = j
a.s = j
a.y = b
a.o = n
e.z = f
e.w = k
e.u = a
e.y = g
e.q = g
m.s = b
m.v = f
m.p = k
m.o = g
n.q = f
n.p = m
n.w = m
n.x = m
assert a.y.w.p.p.s.q.w.o.y.txt == "j"