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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: H = None
        self.w: F = None
        self.y: E = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.q: E = None
        self.p: B = None
        self.z: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: G = None
        self.v: A = None
        self.x: B = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: A = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: H = None
        self.w: F = None
        self.y: E = None
        self.r: E = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.q: E = None
        self.p: B = None
        self.z: D = None
        self.y: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: G = None
        self.v: A = None
        self.x: B = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: A = None
        self.r: D = None
        self.w: B = None
        self.txt = txt

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

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