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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.s: E = None
        self.p: F = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: H = None
        self.z: F = None
        self.x: G = None
        self.u: F = None
        self.s: B = None
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.z: D = None
        self.u: H = None
        self.o: C = None
        self.x: C = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.y: E = None
        self.x: A = None
        self.o: C = None
        self.w: A = None
        self.u: I = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.t: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: A = None
        self.s: E = None
        self.p: F = None
        self.r: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: H = None
        self.z: F = None
        self.x: G = None
        self.u: F = None
        self.s: B = None
        self.r: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.z: D = None
        self.u: H = None
        self.o: C = None
        self.x: C = None
        self.s: D = None
        self.p: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.y: E = None
        self.x: A = None
        self.o: C = None
        self.w: A = None
        self.u: I = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.t: H = None
        self.y: E = None
        self.txt = txt

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

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

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

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