class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: D = None
        self.y: F = None
        self.t: E = None
        self.o: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: E = None
        self.x: H = None
        self.r: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.t: D = None
        self.v: I = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: J = None
        self.s: C = None
        self.q: H = None
        self.p: C = None
        self.r: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: E = None
        self.x: H = None
        self.r: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: H = None
        self.t: D = None
        self.v: I = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: J = None
        self.s: C = None
        self.q: H = None
        self.p: C = None
        self.r: I = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

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