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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: A = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: A = None
        self.t: A = None
        self.s: C = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: A = None
        self.p: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: A = None
        self.t: A = None
        self.s: C = None
        self.x: G = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.y: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

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

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

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