class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: B = None
        self.w: F = None
        self.q: D = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.y: B = None
        self.v: A = None
        self.w: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.r: E = None
        self.u: F = None
        self.v: F = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.w: B = None
        self.s: A = None
        self.v: D = None
        self.t: A = None
        self.u: E = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: E = None
        self.r: C = None
        self.q: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: C = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: D = None
        self.y: B = None
        self.v: A = None
        self.w: A = None
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: E = None
        self.r: E = None
        self.u: F = None
        self.v: F = None
        self.o: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: B = None
        self.w: B = None
        self.s: A = None
        self.v: D = None
        self.t: A = None
        self.u: E = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: E = None
        self.r: C = None
        self.q: C = None
        self.txt = txt

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

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