class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: F = None
        self.p: C = None
        self.t: H = None
        self.v: F = None
        self.w: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: D = None
        self.x: D = None
        self.s: D = None
        self.q: A = None
        self.v: F = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: F = None
        self.w: B = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.q: C = None
        self.x: F = None
        self.r: B = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: D = None
        self.x: D = None
        self.s: D = None
        self.q: A = None
        self.v: F = None
        self.t: I = None
        self.w: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: F = None
        self.w: B = None
        self.s: E = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: G = None
        self.q: C = None
        self.x: F = None
        self.r: B = None
        self.s: E = None
        self.txt = txt

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

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

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