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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.q: B = None
        self.x: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: C = None
        self.q: B = None
        self.x: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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