class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.p: F = None
        self.s: C = None
        self.w: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.v: E = None
        self.u: H = None
        self.y: A = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.w: D = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.v: E = None
        self.u: H = None
        self.y: A = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: D = None
        self.v: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.u: H = None
        self.w: D = None
        self.p: E = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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