class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.x: H = None
        self.y: E = None
        self.q: C = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.z: A = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: C = None
        self.x: H = None
        self.y: E = None
        self.q: C = None
        self.o: A = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.z: A = None
        self.o: C = None
        self.txt = txt

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

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

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

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

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

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