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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

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