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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.q: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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

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