class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.r: H = None
        self.u: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.v: F = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.v: F = None
        self.r: B = None
        self.s: D = None
        self.txt = txt

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

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

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

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

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

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

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

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