class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: G = None
        self.x: E = None
        self.u: E = None
        self.p: A = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: A = None
        self.v: J = None
        self.x: G = None
        self.w: J = None
        self.z: J = None
        self.q: E = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.y: B = None
        self.x: J = None
        self.z: B = None
        self.t: I = None
        self.r: F = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: H = None
        self.y: A = None
        self.r: E = None
        self.q: B = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: G = None
        self.x: E = None
        self.u: E = None
        self.p: A = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: A = None
        self.v: J = None
        self.x: G = None
        self.w: J = None
        self.z: J = None
        self.q: E = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: H = None
        self.y: B = None
        self.x: J = None
        self.z: B = None
        self.t: I = None
        self.r: F = None
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.r: F = None
        self.o: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: H = None
        self.y: A = None
        self.r: E = None
        self.q: B = None
        self.s: A = None
        self.v: F = None
        self.txt = txt

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

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