class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: G = None
        self.u: D = None
        self.t: H = None
        self.x: D = None
        self.w: D = None
        self.p: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.s: C = None
        self.o: D = None
        self.y: C = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: A = None
        self.s: C = None
        self.o: D = None
        self.y: C = None
        self.v: I = None
        self.txt = txt

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

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

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