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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: H = None
        self.w: H = None
        self.r: I = None
        self.y: E = None
        self.v: A = None
        self.x: D = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: H = None
        self.w: C = None
        self.u: D = None
        self.t: I = None
        self.o: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: F = None
        self.s: C = None
        self.p: F = None
        self.v: H = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: H = None
        self.w: H = None
        self.r: I = None
        self.y: E = None
        self.v: A = None
        self.x: D = None
        self.p: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: H = None
        self.w: C = None
        self.u: D = None
        self.t: I = None
        self.o: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: F = None
        self.s: C = None
        self.p: F = None
        self.v: H = None
        self.t: C = None
        self.txt = txt

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

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