class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: A = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.s: C = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: I = None
        self.q: I = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: A = None
        self.q: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: G = None
        self.s: C = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: I = None
        self.q: I = None
        self.s: G = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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