class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.t: C = None
        self.r: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.x: G = None
        self.v: J = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.v: D = None
        self.s: H = None
        self.r: A = None
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.r: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.p: A = None
        self.x: G = None
        self.v: J = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.p: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: B = None
        self.v: D = None
        self.s: H = None
        self.r: A = None
        self.z: I = None
        self.txt = txt

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

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