class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: H = None
        self.y: D = None
        self.p: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.q: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: B = None
        self.u: G = None
        self.x: F = None
        self.v: F = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: A = None
        self.q: E = None
        self.p: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: B = None
        self.u: G = None
        self.x: F = None
        self.v: F = None
        self.q: B = None
        self.y: C = None
        self.txt = txt

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

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