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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.o: A = None
        self.p: G = None
        self.u: F = None
        self.z: I = None
        self.q: F = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.v: D = None
        self.p: H = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: A = None
        self.v: I = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.s: A = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: E = None
        self.z: D = None
        self.v: I = None
        self.r: G = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.t: B = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: F = None
        self.o: A = None
        self.p: G = None
        self.u: F = None
        self.z: I = None
        self.q: F = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: E = None
        self.v: D = None
        self.p: H = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: A = None
        self.v: I = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.s: A = None
        self.v: F = None
        self.r: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: E = None
        self.z: D = None
        self.v: I = None
        self.r: G = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.t: B = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: B = None
        self.v: D = None
        self.txt = txt

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

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