class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.p: H = None
        self.y: D = None
        self.q: I = None
        self.u: C = None
        self.x: H = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: D = None
        self.y: F = None
        self.s: E = None
        self.u: G = None
        self.w: G = None
        self.o: C = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.p: H = None
        self.y: D = None
        self.q: I = None
        self.u: C = None
        self.x: H = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: D = None
        self.y: F = None
        self.s: E = None
        self.u: G = None
        self.w: G = None
        self.o: C = None
        self.t: C = None
        self.v: I = None
        self.txt = txt

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

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

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