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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.z: H = None
        self.q: D = None
        self.u: D = None
        self.r: F = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.x: D = None
        self.t: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: B = None
        self.q: E = None
        self.p: A = None
        self.v: H = None
        self.s: H = None
        self.z: A = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: A = None
        self.r: C = None
        self.u: A = None
        self.z: A = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: G = None
        self.z: H = None
        self.q: D = None
        self.u: D = None
        self.r: F = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: G = None
        self.x: D = None
        self.t: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: B = None
        self.q: E = None
        self.p: A = None
        self.v: H = None
        self.s: H = None
        self.z: A = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: A = None
        self.r: C = None
        self.u: A = None
        self.z: A = None
        self.p: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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