class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.r: I = None
        self.o: I = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: D = None
        self.o: G = None
        self.y: C = None
        self.p: H = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: G = None
        self.z: A = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: J = None
        self.x: E = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: J = None
        self.z: J = None
        self.v: I = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: G = None
        self.y: E = None
        self.u: E = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: C = None
        self.q: G = None
        self.z: J = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

b = A("b")
f = B("f")
j = C("j")
k = D("k")
e = E("e")
n = F("n")
g = G("g")
m = H("m")
h = I("h")
d = J("d")

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

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: D = None
        self.o: G = None
        self.y: C = None
        self.p: H = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: G = None
        self.z: A = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: J = None
        self.x: E = None
        self.z: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: J = None
        self.z: J = None
        self.v: I = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: G = None
        self.y: E = None
        self.u: E = None
        self.x: G = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: C = None
        self.q: G = None
        self.z: J = None
        self.x: C = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

b = A("b")
f = B("f")
j = C("j")
k = D("k")
e = E("e")
n = F("n")
g = G("g")
m = H("m")
h = I("h")
d = J("d")

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