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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: D = None
        self.u: C = None
        self.p: C = None
        self.z: C = None
        self.t: C = None
        self.o: I = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: B = None
        self.o: A = None
        self.s: C = None
        self.q: F = None
        self.y: I = None
        self.p: I = None
        self.txt = txt

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

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

j.v = f
j.r = f
j.q = h
j.x = d
j.z = n
h.r = m
h.o = j
h.u = d
a.o = f
a.z = f
a.u = h
a.r = h
a.y = h
a.p = n
a.s = d
a.t = m
a.q = g
d.w = j
d.u = j
d.v = e
d.t = e
d.p = m
d.s = g
d.x = g
d.z = f
g.v = n
g.o = n
g.w = a
g.z = h
g.s = d
g.p = d
g.y = j
g.x = f
m.r = a
m.p = a
f.r = h
f.y = d
f.u = a
f.p = a
f.z = a
f.t = a
f.o = n
f.w = j
e.x = a
e.s = a
e.r = h
e.o = j
e.q = m
e.y = n
e.p = n
n.s = j
assert n.s.z.s.x.p.r.u.u.x.txt == "
class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: B = None
        self.r: G = None
        self.x: D = None
        self.z: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: D = None
        self.u: C = None
        self.p: C = None
        self.z: C = None
        self.t: C = None
        self.o: I = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.r: B = None
        self.o: A = None
        self.s: C = None
        self.q: F = None
        self.y: I = None
        self.p: I = None
        self.txt = txt

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

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

j.v = f
j.r = f
j.q = h
j.x = d
j.z = n
h.r = m
h.o = j
h.u = d
a.o = f
a.z = f
a.u = h
a.r = h
a.y = h
a.p = n
a.s = d
a.t = m
a.q = g
d.w = j
d.u = j
d.v = e
d.t = e
d.p = m
d.s = g
d.x = g
d.z = f
g.v = n
g.o = n
g.w = a
g.z = h
g.s = d
g.p = d
g.y = j
g.x = f
m.r = a
m.p = a
f.r = h
f.y = d
f.u = a
f.p = a
f.z = a
f.t = a
f.o = n
f.w = j
e.x = a
e.s = a
e.r = h
e.o = j
e.q = m
e.y = n
e.p = n
n.s = j
assert n.s.z.s.x.p.r.u.u.x.txt == "g"