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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.q: C = None
        self.z: C = None
        self.t: C = None
        self.v: G = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: A = None
        self.r: G = None
        self.v: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: E = None
        self.q: C = None
        self.z: C = None
        self.t: C = None
        self.v: G = None
        self.w: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: A = None
        self.r: G = None
        self.v: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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