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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: I = None
        self.o: H = None
        self.x: F = None
        self.s: D = None
        self.q: F = None
        self.w: H = None
        self.y: D = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: F = None
        self.w: F = None
        self.r: B = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.x: H = None
        self.r: G = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: I = None
        self.w: F = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.x: I = None
        self.v: F = None
        self.y: B = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.u: H = None
        self.r: G = None
        self.y: H = None
        self.z: E = None
        self.w: F = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: I = None
        self.o: H = None
        self.x: F = None
        self.s: D = None
        self.q: F = None
        self.w: H = None
        self.y: D = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: F = None
        self.w: F = None
        self.r: B = None
        self.u: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: F = None
        self.x: H = None
        self.r: G = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: I = None
        self.w: F = None
        self.x: D = None
        self.y: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.x: I = None
        self.v: F = None
        self.y: B = None
        self.q: B = None
        self.u: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: E = None
        self.u: H = None
        self.r: G = None
        self.y: H = None
        self.z: E = None
        self.w: F = None
        self.x: C = None
        self.txt = txt

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

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