class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: C = None
        self.w: G = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: I = None
        self.s: E = None
        self.z: F = None
        self.y: F = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: I = None
        self.z: F = None
        self.y: C = None
        self.u: J = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: I = None
        self.q: I = None
        self.y: F = None
        self.p: D = None
        self.v: H = None
        self.z: D = None
        self.t: G = None
        self.u: D = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: G = None
        self.y: F = None
        self.w: F = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.x: E = None
        self.z: E = None
        self.y: C = None
        self.u: B = None
        self.v: G = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: F = None
        self.y: E = None
        self.x: C = None
        self.q: E = None
        self.txt = txt

g = A("g")
h = B("h")
n = C("n")
m = D("m")
f = E("f")
c = F("c")
j = G("j")
a = H("a")
b = I("b")
l = J("l")

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: I = None
        self.s: E = None
        self.z: F = None
        self.y: F = None
        self.o: D = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: I = None
        self.z: F = None
        self.y: C = None
        self.u: J = None
        self.o: E = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: I = None
        self.q: I = None
        self.y: F = None
        self.p: D = None
        self.v: H = None
        self.z: D = None
        self.t: G = None
        self.u: D = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.p: C = None
        self.v: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: G = None
        self.y: F = None
        self.w: F = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.x: E = None
        self.z: E = None
        self.y: C = None
        self.u: B = None
        self.v: G = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: F = None
        self.y: E = None
        self.x: C = None
        self.q: E = None
        self.txt = txt

g = A("g")
h = B("h")
n = C("n")
m = D("m")
f = E("f")
c = F("c")
j = G("j")
a = H("a")
b = I("b")
l = J("l")

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