class A:
    def __init__(self, txt: str):
        self.u: B = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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