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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: H = None
        self.o: F = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.p: F = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: H = None
        self.o: F = None
        self.t: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: F = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: D = None
        self.p: F = None
        self.v: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: C = None
        self.x: B = None
        self.txt = txt

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

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