class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: F = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.v: C = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: B = None
        self.p: D = None
        self.w: E = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: I = None
        self.u: B = None
        self.w: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: F = None
        self.p: I = None
        self.o: D = None
        self.w: B = None
        self.y: F = None
        self.x: C = None
        self.z: A = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: I = None
        self.q: C = None
        self.w: A = None
        self.s: A = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.q: F = None
        self.w: F = None
        self.s: A = None
        self.r: B = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: G = None
        self.v: C = None
        self.w: G = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.r: B = None
        self.p: D = None
        self.w: E = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: I = None
        self.u: B = None
        self.w: E = None
        self.p: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: F = None
        self.p: I = None
        self.o: D = None
        self.w: B = None
        self.y: F = None
        self.x: C = None
        self.z: A = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: I = None
        self.q: C = None
        self.w: A = None
        self.s: A = None
        self.u: E = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: B = None
        self.q: F = None
        self.w: F = None
        self.s: A = None
        self.r: B = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: D = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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