class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: B = None
        self.r: H = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: F = None
        self.o: I = None
        self.w: J = None
        self.y: A = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: A = None
        self.x: J = None
        self.p: J = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: B = None
        self.z: F = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: D = None
        self.z: B = None
        self.w: H = None
        self.u: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: F = None
        self.o: I = None
        self.w: J = None
        self.y: A = None
        self.p: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.o: A = None
        self.x: J = None
        self.p: J = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: B = None
        self.z: F = None
        self.x: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: D = None
        self.z: B = None
        self.w: H = None
        self.u: I = None
        self.txt = txt

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

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