class A:
    def __init__(self, txt: str):
        self.q: J = None
        self.r: G = None
        self.y: J = None
        self.p: B = None
        self.w: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: H = None
        self.t: I = None
        self.y: G = None
        self.x: D = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: B = None
        self.v: G = None
        self.p: B = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.t: B = None
        self.x: G = None
        self.q: B = None
        self.w: G = None
        self.y: H = None
        self.v: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: H = None
        self.t: I = None
        self.y: G = None
        self.x: D = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.y: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: B = None
        self.v: G = None
        self.p: B = None
        self.t: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: D = None
        self.t: B = None
        self.x: G = None
        self.q: B = None
        self.w: G = None
        self.y: H = None
        self.v: A = None
        self.txt = txt

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

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