class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: H = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: I = None
        self.t: B = None
        self.p: D = None
        self.s: A = None
        self.x: D = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: H = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: I = None
        self.t: B = None
        self.p: D = None
        self.s: A = None
        self.x: D = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

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