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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: G = None
        self.w: H = None
        self.x: I = None
        self.o: E = None
        self.s: A = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: H = None
        self.w: D = None
        self.y: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: G = None
        self.w: E = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: G = None
        self.w: H = None
        self.x: I = None
        self.o: E = None
        self.s: A = None
        self.z: A = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: H = None
        self.w: D = None
        self.y: H = None
        self.txt = txt

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

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