class A:
    def __init__(self, txt: str):
        self.t: J = None
        self.y: C = None
        self.z: E = None
        self.w: E = None
        self.p: B = None
        self.s: D = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: I = None
        self.o: D = None
        self.r: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: J = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: C = None
        self.q: F = None
        self.o: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: I = None
        self.o: D = None
        self.r: B = None
        self.x: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: J = None
        self.z: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.p: C = None
        self.q: F = None
        self.o: B = None
        self.txt = txt

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

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

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

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