class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: F = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.v: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: I = None
        self.x: I = None
        self.q: J = None
        self.t: G = None
        self.w: E = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: J = None
        self.y: E = None
        self.q: E = None
        self.r: G = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.y: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: F = None
        self.o: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: G = None
        self.v: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.v: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: I = None
        self.x: I = None
        self.q: J = None
        self.t: G = None
        self.w: E = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: J = None
        self.y: E = None
        self.q: E = None
        self.r: G = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.y: I = None
        self.txt = txt

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

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