class A:
    def __init__(self, txt: str):
        self.r: I = None
        self.u: G = None
        self.s: B = None
        self.v: B = None
        self.o: C = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: G = None
        self.t: E = None
        self.p: I = None
        self.z: C = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: I = None
        self.s: I = None
        self.x: B = None
        self.t: F = None
        self.u: E = None
        self.q: I = None
        self.r: F = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: C = None
        self.q: C = None
        self.y: G = None
        self.t: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: D = None
        self.r: I = None
        self.w: D = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.x: A = None
        self.u: D = None
        self.z: C = None
        self.w: D = None
        self.y: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.u: A = None
        self.o: F = None
        self.p: B = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.o: C = None
        self.s: F = None
        self.u: H = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

m = A("m")
n = B("n")
i = C("i")
f = D("f")
a = E("a")
e = F("e")
g = G("g")
l = H("l")
j = I("j")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: G = None
        self.t: E = None
        self.p: I = None
        self.z: C = None
        self.q: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: I = None
        self.s: I = None
        self.x: B = None
        self.t: F = None
        self.u: E = None
        self.q: I = None
        self.r: F = None
        self.w: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: C = None
        self.q: C = None
        self.y: G = None
        self.t: F = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: D = None
        self.r: I = None
        self.w: D = None
        self.x: A = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: F = None
        self.x: A = None
        self.u: D = None
        self.z: C = None
        self.w: D = None
        self.y: H = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: F = None
        self.u: A = None
        self.o: F = None
        self.p: B = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.p: C = None
        self.o: C = None
        self.s: F = None
        self.u: H = None
        self.x: F = None
        self.q: F = None
        self.txt = txt

m = A("m")
n = B("n")
i = C("i")
f = D("f")
a = E("a")
e = F("e")
g = G("g")
l = H("l")
j = I("j")

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