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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: J = None
        self.o: I = None
        self.v: A = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: F = None
        self.t: G = None
        self.v: I = None
        self.o: A = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: J = None
        self.o: I = None
        self.v: A = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: E = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: F = None
        self.t: G = None
        self.v: I = None
        self.o: A = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

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

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