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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: I = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.q: H = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.s: H = None
        self.w: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: I = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.x: A = None
        self.q: H = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: I = None
        self.txt = txt

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

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

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