class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.x: H = None
        self.u: A = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.v: G = None
        self.y: A = None
        self.z: D = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.u: D = None
        self.v: G = None
        self.y: A = None
        self.z: D = None
        self.s: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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