class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.t: J = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.z: B = None
        self.r: I = None
        self.x: F = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.v: F = None
        self.x: E = None
        self.s: J = None
        self.w: H = None
        self.y: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: J = None
        self.v: B = None
        self.x: E = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: J = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: H = None
        self.u: G = None
        self.s: E = None
        self.txt = txt

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

h.q = n
h.v = f
h.t = a
h.u = m
g.q = d
e.y = f
e.q = f
e.u = g
e.z = g
e.r = d
e.x = n
i.u = j
i.x = j
i.o = f
i.v = n
i.s = a
i.w = m
i.y = e
j.y = e
n.u = e
f.y = a
f.s = g
f.t = e
m.o = h
m.t = a
m.v = g
m.x = j
m.y = e
d.r = h
d.u = h
d.o = a
d.z = n
a.v = e
a.y = m
a.u = f
a.s = j
assert j.y.x.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.v: G = None
        self.t: J = None
        self.u: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.u: B = None
        self.z: B = None
        self.r: I = None
        self.x: F = None
        self.q: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.v: F = None
        self.x: E = None
        self.s: J = None
        self.w: H = None
        self.y: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.s: B = None
        self.t: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: J = None
        self.v: B = None
        self.x: E = None
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.o: J = None
        self.z: F = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: H = None
        self.u: G = None
        self.s: E = None
        self.txt = txt

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

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