class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: G = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: H = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: B = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.p: E = None
        self.o: C = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: C = None
        self.s: J = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.v: H = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: J = None
        self.u: B = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: H = None
        self.p: E = None
        self.o: C = None
        self.w: I = None
        self.v: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: J = None
        self.u: C = None
        self.s: J = None
        self.p: C = None
        self.txt = txt

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

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

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