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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: F = None
        self.o: I = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: A = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: H = None
        self.y: F = None
        self.x: B = None
        self.v: D = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: F = None
        self.o: I = None
        self.w: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: A = None
        self.s: C = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: H = None
        self.y: F = None
        self.x: B = None
        self.v: D = None
        self.z: H = None
        self.txt = txt

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

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