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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: F = None
        self.t: D = None
        self.o: C = None
        self.p: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.x: H = None
        self.o: C = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: G = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: F = None
        self.t: D = None
        self.o: C = None
        self.p: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.x: H = None
        self.o: C = None
        self.z: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: E = None
        self.txt = txt

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

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