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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: D = None
        self.txt = txt

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

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