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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: A = None
        self.r: B = None
        self.z: F = None
        self.y: F = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.r: I = None
        self.p: D = None
        self.t: F = None
        self.v: F = None
        self.z: H = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.q: A = None
        self.r: B = None
        self.z: F = None
        self.y: F = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.r: I = None
        self.p: D = None
        self.t: F = None
        self.v: F = None
        self.z: H = None
        self.txt = txt

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

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

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

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