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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.s: H = None
        self.w: A = None
        self.p: H = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: C = None
        self.q: G = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: I = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.s: C = None
        self.x: E = None
        self.q: H = None
        self.y: C = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: A = None
        self.s: H = None
        self.w: A = None
        self.p: H = None
        self.y: F = None
        self.v: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: C = None
        self.q: G = None
        self.z: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: F = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: I = None
        self.o: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: F = None
        self.s: C = None
        self.x: E = None
        self.q: H = None
        self.y: C = None
        self.v: F = None
        self.r: C = None
        self.txt = txt

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

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