class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: I = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: B = None
        self.o: B = None
        self.p: A = None
        self.r: D = None
        self.t: H = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: I = None
        self.o: B = None
        self.u: E = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: G = None
        self.r: C = None
        self.t: A = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: B = None
        self.o: B = None
        self.p: A = None
        self.r: D = None
        self.t: H = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: I = None
        self.o: B = None
        self.u: E = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: G = None
        self.r: C = None
        self.t: A = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.y: H = None
        self.v: F = None
        self.txt = txt

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

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