class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: I = None
        self.z: I = None
        self.t: B = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: G = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: B = None
        self.p: F = None
        self.v: F = None
        self.o: E = None
        self.s: C = None
        self.q: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: I = None
        self.z: I = None
        self.t: B = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: G = None
        self.q: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: B = None
        self.p: F = None
        self.v: F = None
        self.o: E = None
        self.s: C = None
        self.q: B = None
        self.txt = txt

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

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