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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.y: F = None
        self.q: I = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: G = None
        self.p: C = None
        self.z: B = None
        self.w: F = None
        self.o: G = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: E = None
        self.y: F = None
        self.p: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: G = None
        self.y: F = None
        self.q: I = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: G = None
        self.p: C = None
        self.z: B = None
        self.w: F = None
        self.o: G = None
        self.u: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: E = None
        self.y: F = None
        self.p: E = None
        self.txt = txt

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

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

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