class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: G = None
        self.s: H = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.z: A = None
        self.o: I = None
        self.w: B = None
        self.u: I = None
        self.t: J = None
        self.q: C = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.y: C = None
        self.u: D = None
        self.o: I = None
        self.x: C = None
        self.txt = txt

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

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

n = A("n")
k = B("k")
a = C("a")
m = D("m")
i = E("i")
b = F("b")
c = G("c")
g = H("g")
d = I("d")
e = J("e")

n.r = b
n.p = c
n.s = g
n.x = i
k.o = m
k.x = e
a.y = m
a.u = b
m.w = c
m.p = c
m.r = c
m.s = a
m.t = b
i.x = n
b.s = n
b.z = n
b.y = a
b.q = a
b.o = d
b.u = d
b.w = k
b.t = e
b.v = g
c.w = e
c.o = i
c.s = i
c.p = k
c.v = m
c.t = b
c.r = g
g.r = a
g.y = a
g.x = a
g.z = m
g.u = m
g.o = d
d.q = e
d.s = k
d.u = c
d.w = c
d.o = c
d.v = i
d.p = a
d.z = a
d.x = n
d.y = b
e.r = n
assert m.t.v.z.t.z.p.t.txt == "
class A:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: G = None
        self.s: H = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: J = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: C = None
        self.z: A = None
        self.o: I = None
        self.w: B = None
        self.u: I = None
        self.t: J = None
        self.q: C = None
        self.v: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.z: D = None
        self.y: C = None
        self.u: D = None
        self.o: I = None
        self.x: C = None
        self.txt = txt

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

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

n = A("n")
k = B("k")
a = C("a")
m = D("m")
i = E("i")
b = F("b")
c = G("c")
g = H("g")
d = I("d")
e = J("e")

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