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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.q: J = None
        self.u: B = None
        self.v: G = None
        self.p: J = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.u: C = None
        self.s: A = None
        self.v: E = None
        self.z: F = None
        self.r: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: I = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.q: J = None
        self.u: B = None
        self.v: G = None
        self.p: J = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: B = None
        self.u: C = None
        self.s: A = None
        self.v: E = None
        self.z: F = None
        self.r: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: I = None
        self.r: I = None
        self.txt = txt

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

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