class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: G = None
        self.p: D = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: F = None
        self.o: E = None
        self.z: D = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.p: E = None
        self.x: F = None
        self.u: F = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.t: J = None
        self.x: B = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: I = None
        self.x: G = None
        self.t: G = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: F = None
        self.y: J = None
        self.r: D = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.w: B = None
        self.p: G = None
        self.z: A = None
        self.r: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.y: F = None
        self.o: E = None
        self.z: D = None
        self.p: C = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: B = None
        self.p: E = None
        self.x: F = None
        self.u: F = None
        self.y: E = None
        self.z: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: D = None
        self.t: J = None
        self.x: B = None
        self.z: C = None
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: I = None
        self.x: G = None
        self.t: G = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: F = None
        self.y: J = None
        self.r: D = None
        self.s: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: D = None
        self.w: B = None
        self.p: G = None
        self.z: A = None
        self.r: J = None
        self.txt = txt

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

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

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