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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: A = None
        self.v: A = None
        self.p: I = None
        self.r: C = None
        self.o: G = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: C = None
        self.q: D = None
        self.x: F = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.q: I = None
        self.p: E = None
        self.u: A = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.x: A = None
        self.v: A = None
        self.p: I = None
        self.r: C = None
        self.o: G = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: C = None
        self.q: D = None
        self.x: F = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: E = None
        self.q: I = None
        self.p: E = None
        self.u: A = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

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

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