class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: C = None
        self.p: H = None
        self.q: F = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: C = None
        self.t: D = None
        self.y: C = None
        self.q: I = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: E = None
        self.q: I = None
        self.r: D = None
        self.u: A = None
        self.z: G = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.t: G = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

i = A("i")
d = B("d")
e = C("e")
g = D("g")
h = E("h")
k = F("k")
f = G("f")
l = H("l")
j = I("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: C = None
        self.p: H = None
        self.q: F = None
        self.w: C = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.r: C = None
        self.t: D = None
        self.y: C = None
        self.q: I = None
        self.p: D = None
        self.v: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: E = None
        self.q: I = None
        self.r: D = None
        self.u: A = None
        self.z: G = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.o: D = None
        self.t: G = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

i = A("i")
d = B("d")
e = C("e")
g = D("g")
h = E("h")
k = F("k")
f = G("f")
l = H("l")
j = I("j")

i.p = j
i.z = h
d.w = g
d.s = g
d.u = l
d.z = e
d.q = e
d.p = j
d.r = j
d.o = f
d.y = h
e.v = l
e.s = i
e.y = i
e.z = g
e.w = d
e.t = j
g.o = j
g.s = e
g.w = e
g.p = l
g.y = l
g.q = k
h.x = l
h.r = e
h.y = e
h.t = g
h.p = g
h.q = j
h.v = d
k.t = g
k.r = g
k.p = h
k.q = j
k.u = i
k.z = f
k.y = d
f.y = h
l.q = e
j.q = h
j.o = g
j.t = f
j.u = e
j.y = e
assert g.y.q.z.y.q.t.txt == "j"