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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.w: B = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: H = None
        self.z: G = None
        self.q: C = None
        self.o: A = None
        self.u: E = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: I = None
        self.u: J = None
        self.s: C = None
        self.t: B = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.q: B = None
        self.v: J = None
        self.z: C = None
        self.o: C = None
        self.x: J = None
        self.r: J = None
        self.u: I = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: H = None
        self.z: C = None
        self.t: I = None
        self.q: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: B = None
        self.w: B = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: H = None
        self.z: G = None
        self.q: C = None
        self.o: A = None
        self.u: E = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: I = None
        self.u: J = None
        self.s: C = None
        self.t: B = None
        self.p: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: C = None
        self.q: B = None
        self.v: J = None
        self.z: C = None
        self.o: C = None
        self.x: J = None
        self.r: J = None
        self.u: I = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.t: F = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.z: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: H = None
        self.z: C = None
        self.t: I = None
        self.q: I = None
        self.txt = txt

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

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