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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.t: H = None
        self.u: C = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: B = None
        self.p: G = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.o: E = None
        self.t: H = None
        self.u: C = None
        self.s: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.s: B = None
        self.p: G = None
        self.w: C = None
        self.t: A = None
        self.txt = txt

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

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

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