class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: F = None
        self.u: C = None
        self.z: F = None
        self.p: C = None
        self.o: F = None
        self.q: B = None
        self.t: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: H = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.p: C = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: H = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: G = None
        self.p: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.p: H = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: I = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: C = None
        self.p: C = None
        self.y: F = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: H = None
        self.q: A = None
        self.x: B = None
        self.txt = txt

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

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