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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: H = None
        self.z: A = None
        self.v: B = None
        self.s: B = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: A = None
        self.z: A = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: H = None
        self.z: G = None
        self.x: H = None
        self.w: H = None
        self.u: E = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: E = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: H = None
        self.z: A = None
        self.v: B = None
        self.s: B = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: A = None
        self.z: A = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: H = None
        self.z: G = None
        self.x: H = None
        self.w: H = None
        self.u: E = None
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: G = None
        self.txt = txt

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

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