class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: F = None
        self.u: E = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: F = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: H = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.r: A = None
        self.o: F = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: F = None
        self.u: E = None
        self.r: G = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.r: F = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: H = None
        self.p: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: F = None
        self.r: A = None
        self.o: F = None
        self.t: E = None
        self.u: F = None
        self.txt = txt

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

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

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