class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: C = None
        self.p: A = None
        self.w: H = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: H = None
        self.v: A = None
        self.x: I = None
        self.p: B = None
        self.txt = txt

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

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

g = A("g")
l = B("l")
b = C("b")
e = D("e")
d = E("d")
k = F("k")
n = G("n")
h = H("h")
a = I("a")

g.y = e
g.o = k
l.y = k
l.z = k
b.o = a
b.t = e
e.w = g
e.s = g
e.z = d
d.q = h
d.u = b
k.r = h
k.w = h
k.u = b
k.p = g
k.z = g
k.t = e
n.t = b
n.s = h
n.v = g
n.x = a
n.p = l
h.p = l
h.x = l
h.s = l
h.o = e
h.r = d
h.u = d
h.z = d
h.q = b
h.v = b
a.v = n
a.y = k
a.x = b
a.t = b
a.o = g
a.z = d
a.q = l
assert e.s.y.s.o.w.v.t.w.o.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: C = None
        self.p: A = None
        self.w: H = None
        self.z: A = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.s: H = None
        self.v: A = None
        self.x: I = None
        self.p: B = None
        self.txt = txt

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

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

g = A("g")
l = B("l")
b = C("b")
e = D("e")
d = E("d")
k = F("k")
n = G("n")
h = H("h")
a = I("a")

g.y = e
g.o = k
l.y = k
l.z = k
b.o = a
b.t = e
e.w = g
e.s = g
e.z = d
d.q = h
d.u = b
k.r = h
k.w = h
k.u = b
k.p = g
k.z = g
k.t = e
n.t = b
n.s = h
n.v = g
n.x = a
n.p = l
h.p = l
h.x = l
h.s = l
h.o = e
h.r = d
h.u = d
h.z = d
h.q = b
h.v = b
a.v = n
a.y = k
a.x = b
a.t = b
a.o = g
a.z = d
a.q = l
assert e.s.y.s.o.w.v.t.w.o.txt == "k"