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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.s: E = None
        self.r: E = None
        self.t: B = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: B = None
        self.o: G = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.o: C = None
        self.x: I = None
        self.u: H = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: E = None
        self.q: C = None
        self.z: I = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: B = None
        self.s: E = None
        self.r: E = None
        self.t: B = None
        self.x: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.x: B = None
        self.o: G = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.s: A = None
        self.o: C = None
        self.x: I = None
        self.u: H = None
        self.w: B = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: E = None
        self.q: C = None
        self.z: I = None
        self.t: D = None
        self.s: B = None
        self.txt = txt

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

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

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