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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: A = None
        self.q: E = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

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

i = A("i")
f = B("f")
k = C("k")
e = D("e")
n = E("n")
j = F("j")
g = G("g")
h = B("h")

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: A = None
        self.q: E = None
        self.w: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: E = None
        self.z: G = None
        self.txt = txt

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

i = A("i")
f = B("f")
k = C("k")
e = D("e")
n = E("n")
j = F("j")
g = G("g")
h = B("h")

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