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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.u: B = None
        self.w: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: E = None
        self.u: B = None
        self.w: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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