class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: I = None
        self.o: A = None
        self.w: E = None
        self.q: I = None
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: B = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.q: C = None
        self.s: F = None
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: I = None
        self.o: A = None
        self.w: E = None
        self.q: I = None
        self.p: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: C = None
        self.v: A = None
        self.z: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: J = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: B = None
        self.o: H = None
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.q: C = None
        self.s: F = None
        self.w: E = None
        self.txt = txt

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

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