class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: C = None
        self.u: I = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.p: A = None
        self.w: G = None
        self.o: H = None
        self.x: H = None
        self.t: F = None
        self.q: G = None
        self.v: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: E = None
        self.o: E = None
        self.w: B = None
        self.r: F = None
        self.p: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.s: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: C = None
        self.p: A = None
        self.w: G = None
        self.o: H = None
        self.x: H = None
        self.t: F = None
        self.q: G = None
        self.v: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: E = None
        self.o: E = None
        self.w: B = None
        self.r: F = None
        self.p: B = None
        self.txt = txt

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

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

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