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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: H = None
        self.t: A = None
        self.x: D = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.x: C = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.z: I = None
        self.s: I = None
        self.u: A = None
        self.r: I = None
        self.v: J = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: H = None
        self.t: A = None
        self.x: D = None
        self.y: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: D = None
        self.x: C = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.z: I = None
        self.s: I = None
        self.u: A = None
        self.r: I = None
        self.v: J = None
        self.txt = txt

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

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

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

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