class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: J = None
        self.w: I = None
        self.z: B = None
        self.o: G = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: F = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: E = None
        self.p: J = None
        self.u: A = None
        self.v: I = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.q: I = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: A = None
        self.u: C = None
        self.q: F = None
        self.s: A = None
        self.x: A = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: I = None
        self.t: C = None
        self.o: A = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: F = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: E = None
        self.p: J = None
        self.u: A = None
        self.v: I = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: B = None
        self.q: I = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: A = None
        self.u: C = None
        self.q: F = None
        self.s: A = None
        self.x: A = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: I = None
        self.t: C = None
        self.o: A = None
        self.v: B = None
        self.w: C = None
        self.txt = txt

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

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