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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: I = None
        self.z: C = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: H = None
        self.o: B = None
        self.u: E = None
        self.w: C = None
        self.s: C = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: E = None
        self.o: H = None
        self.y: I = None
        self.v: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.r: A = None
        self.v: E = None
        self.u: F = None
        self.x: F = None
        self.p: C = None
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: I = None
        self.z: C = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: H = None
        self.o: B = None
        self.u: E = None
        self.w: C = None
        self.s: C = None
        self.p: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.u: E = None
        self.o: H = None
        self.y: I = None
        self.v: C = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: F = None
        self.r: A = None
        self.v: E = None
        self.u: F = None
        self.x: F = None
        self.p: C = None
        self.y: D = None
        self.w: H = None
        self.txt = txt

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

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

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