class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: I = None
        self.x: F = None
        self.t: H = None
        self.u: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.p: H = None
        self.t: F = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: E = None
        self.x: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: H = None
        self.p: H = None
        self.t: F = None
        self.o: I = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.v: E = None
        self.x: B = None
        self.txt = txt

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

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