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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.y: I = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: E = None
        self.z: D = None
        self.s: G = None
        self.t: G = None
        self.x: B = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.y: I = None
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: C = None
        self.s: B = None
        self.q: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: E = None
        self.z: D = None
        self.s: G = None
        self.t: G = None
        self.x: B = None
        self.txt = txt

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

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