class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: A = None
        self.y: G = None
        self.q: F = None
        self.u: A = None
        self.w: H = None
        self.o: D = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.q: G = None
        self.s: I = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.y: I = None
        self.q: I = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.r: B = None
        self.w: F = None
        self.q: C = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.x: A = None
        self.y: G = None
        self.q: F = None
        self.u: A = None
        self.w: H = None
        self.o: D = None
        self.t: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.q: G = None
        self.s: I = None
        self.o: B = None
        self.x: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.y: I = None
        self.q: I = None
        self.z: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: F = None
        self.r: B = None
        self.w: F = None
        self.q: C = None
        self.y: C = None
        self.p: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.txt = txt

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

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