class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: H = None
        self.s: C = None
        self.v: G = None
        self.r: D = None
        self.p: G = None
        self.q: H = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: J = None
        self.r: G = None
        self.p: J = None
        self.v: H = None
        self.q: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: I = None
        self.y: F = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: G = None
        self.z: A = None
        self.y: B = None
        self.w: E = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: G = None
        self.x: A = None
        self.w: G = None
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: J = None
        self.r: G = None
        self.p: J = None
        self.v: H = None
        self.q: G = None
        self.s: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.s: I = None
        self.y: F = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.x: J = None
        self.u: G = None
        self.z: A = None
        self.y: B = None
        self.w: E = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: G = None
        self.x: A = None
        self.w: G = None
        self.s: A = None
        self.txt = txt

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

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