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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: H = None
        self.o: J = None
        self.x: H = None
        self.s: I = None
        self.r: J = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.r: B = None
        self.y: A = None
        self.w: A = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.t: B = None
        self.w: B = None
        self.v: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.w: H = None
        self.o: J = None
        self.x: H = None
        self.s: I = None
        self.r: J = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.r: B = None
        self.y: A = None
        self.w: A = None
        self.o: G = None
        self.v: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.t: B = None
        self.w: B = None
        self.v: H = None
        self.txt = txt

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

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