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

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: G = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: B = None
        self.w: B = None
        self.y: I = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.p: B = None
        self.s: E = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

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

e.t = h
e.q = i
e.y = b
m.z = k
m.s = c
m.y = c
m.r = c
m.o = l
m.p = i
m.v = i
m.w = h
m.q = e
k.q = h
k.o = d
l.q = e
l.w = c
l.o = k
h.x = d
d.s = b
d.y = b
d.z = m
d.w = m
d.r = i
c.q = k
c.z = d
c.v = i
i.z = m
i.v = c
i.p = l
i.o = h
b.q = l
b.t = d
b.p = m
b.s = h
b.w = c
b.v = i
assert i.p.q.q.z.z.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: H = None
        self.y: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: G = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: B = None
        self.w: B = None
        self.y: I = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: F = None
        self.p: B = None
        self.s: E = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

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

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