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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: C = None
        self.s: A = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.o: J = None
        self.w: D = None
        self.u: H = None
        self.s: J = None
        self.p: J = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.o: I = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: E = None
        self.z: F = None
        self.u: E = None
        self.w: C = None
        self.q: H = None
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: C = None
        self.s: A = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: H = None
        self.o: J = None
        self.w: D = None
        self.u: H = None
        self.s: J = None
        self.p: J = None
        self.q: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: D = None
        self.o: I = None
        self.u: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: E = None
        self.z: F = None
        self.u: E = None
        self.w: C = None
        self.q: H = None
        self.y: C = None
        self.txt = txt

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

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

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