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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.o: D = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: G = None
        self.o: D = None
        self.s: G = None
        self.r: H = None
        self.txt = txt

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

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