class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: G = None
        self.p: F = None
        self.s: H = None
        self.x: F = None
        self.t: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: A = None
        self.txt = txt

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

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

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