class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: F = None
        self.x: E = None
        self.y: G = None
        self.v: F = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: F = None
        self.u: H = None
        self.s: H = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: A = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: F = None
        self.o: J = None
        self.s: C = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: G = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: G = None
        self.x: J = None
        self.v: D = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: J = None
        self.u: F = None
        self.v: I = None
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: B = None
        self.v: F = None
        self.y: D = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: F = None
        self.u: H = None
        self.s: H = None
        self.p: A = None
        self.x: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: J = None
        self.w: A = None
        self.u: B = None
        self.p: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: F = None
        self.o: J = None
        self.s: C = None
        self.q: G = None
        self.y: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: G = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: G = None
        self.x: J = None
        self.v: D = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: J = None
        self.u: F = None
        self.v: I = None
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: B = None
        self.v: F = None
        self.y: D = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

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

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

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