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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.u: B = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.r: E = None
        self.p: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: F = None
        self.u: B = None
        self.w: A = None
        self.y: H = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: C = None
        self.r: E = None
        self.p: A = None
        self.txt = txt

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

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