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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

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

k.v = a
k.z = m
k.x = m
k.y = j
k.u = h
k.s = b
k.w = c
k.t = c
k.q = c
h.v = k
h.o = c
a.p = b
a.w = j
a.t = m
a.z = g
a.q = k
a.o = h
i.x = k
i.s = k
i.t = a
i.y = j
i.q = j
c.s = i
g.v = c
g.p = c
g.q = c
j.x = b
j.u = g
j.v = k
j.y = h
j.s = h
j.t = c
b.s = h
b.w = h
b.y = a
b.t = j
b.u = m
b.p = c
b.q = g
d.o = b
d.x = i
d.z = k
m.x = k
m.s = k
m.t = a
m.y = j
m.q = j
assert a.z.p.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: D = None
        self.y: G = None
        self.u: B = None
        self.s: H = None
        self.w: E = None
        self.t: E = None
        self.x: D = None
        self.q: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: D = None
        self.z: A = None
        self.txt = txt

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

k.v = a
k.z = m
k.x = m
k.y = j
k.u = h
k.s = b
k.w = c
k.t = c
k.q = c
h.v = k
h.o = c
a.p = b
a.w = j
a.t = m
a.z = g
a.q = k
a.o = h
i.x = k
i.s = k
i.t = a
i.y = j
i.q = j
c.s = i
g.v = c
g.p = c
g.q = c
j.x = b
j.u = g
j.v = k
j.y = h
j.s = h
j.t = c
b.s = h
b.w = h
b.y = a
b.t = j
b.u = m
b.p = c
b.q = g
d.o = b
d.x = i
d.z = k
m.x = k
m.s = k
m.t = a
m.y = j
m.q = j
assert a.z.p.s.t.txt == "a"