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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: J = None
        self.y: A = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.p: A = None
        self.r: D = None
        self.z: G = None
        self.w: J = None
        self.v: J = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: I = None
        self.q: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: D = None
        self.o: E = None
        self.r: F = None
        self.t: A = None
        self.q: A = None
        self.x: H = None
        self.z: C = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: E = None
        self.w: D = None
        self.t: D = None
        self.s: H = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: J = None
        self.y: A = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: F = None
        self.p: A = None
        self.r: D = None
        self.z: G = None
        self.w: J = None
        self.v: J = None
        self.x: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.t: I = None
        self.q: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: D = None
        self.o: E = None
        self.r: F = None
        self.t: A = None
        self.q: A = None
        self.x: H = None
        self.z: C = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: G = None
        self.o: E = None
        self.w: D = None
        self.t: D = None
        self.s: H = None
        self.x: C = None
        self.txt = txt

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

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