class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: D = None
        self.v: F = None
        self.w: D = None
        self.p: B = None
        self.s: B = None
        self.y: G = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: F = None
        self.t: F = None
        self.s: D = None
        self.u: B = None
        self.x: F = None
        self.v: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.s: D = None
        self.x: H = None
        self.o: H = None
        self.v: E = None
        self.u: B = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: F = None
        self.t: F = None
        self.s: D = None
        self.u: B = None
        self.x: F = None
        self.v: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.y: F = None
        self.s: D = None
        self.x: H = None
        self.o: H = None
        self.v: E = None
        self.u: B = None
        self.t: B = None
        self.txt = txt

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

h.x = f
h.z = a
h.w = a
h.v = m
h.p = e
h.s = e
h.y = i
h.r = i
e.x = m
e.p = f
k.t = g
k.r = g
k.p = f
k.v = f
k.x = f
k.y = a
k.z = h
k.w = j
a.y = g
a.s = f
n.p = i
n.o = m
n.t = m
n.x = m
n.s = a
n.u = e
n.v = g
m.v = a
m.r = a
m.z = e
m.u = e
m.p = n
m.s = f
m.t = h
i.w = a
i.t = a
i.y = a
i.o = n
i.r = k
j.v = e
j.z = n
j.p = g
f.z = e
f.u = e
f.t = e
f.y = m
f.s = a
f.x = j
f.o = j
f.v = n
g.t = k
g.r = k
g.p = f
g.v = f
g.x = f
g.y = a
g.z = h
g.w = j
assert i.r.y.s.y.s.o.txt == "j"