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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.x: C = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.x: C = None
        self.p: I = None
        self.txt = txt

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

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

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

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

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