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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.o: G = None
        self.w: I = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: B = None
        self.p: E = None
        self.r: A = None
        self.u: D = None
        self.y: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: H = None
        self.o: G = None
        self.w: I = None
        self.r: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.w: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.z: B = None
        self.p: E = None
        self.r: A = None
        self.u: D = None
        self.y: E = None
        self.txt = txt

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

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