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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.t: C = None
        self.w: D = None
        self.v: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

m = A("m")
b = B("b")
a = C("a")
g = D("g")
l = E("l")
j = F("j")
d = G("d")
i = H("i")
e = I("e")
k = J("k")

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: G = None
        self.t: C = None
        self.w: D = None
        self.v: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

m = A("m")
b = B("b")
a = C("a")
g = D("g")
l = E("l")
j = F("j")
d = G("d")
i = H("i")
e = I("e")
k = J("k")

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