class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: H = None
        self.x: I = None
        self.t: F = None
        self.z: B = None
        self.u: J = None
        self.v: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: I = None
        self.r: H = None
        self.y: H = None
        self.w: J = None
        self.u: J = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: I = None
        self.x: I = None
        self.s: C = None
        self.z: C = None
        self.r: B = None
        self.v: A = None
        self.t: J = None
        self.u: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.x: A = None
        self.u: I = None
        self.q: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: I = None
        self.r: H = None
        self.y: H = None
        self.w: J = None
        self.u: J = None
        self.z: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: F = None
        self.v: G = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: I = None
        self.x: I = None
        self.s: C = None
        self.z: C = None
        self.r: B = None
        self.v: A = None
        self.t: J = None
        self.u: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.x: A = None
        self.u: I = None
        self.q: H = None
        self.txt = txt

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

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