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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: E = None
        self.p: I = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.o: E = None
        self.y: C = None
        self.t: D = None
        self.z: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.o: E = None
        self.p: E = None
        self.w: F = None
        self.q: F = None
        self.x: H = None
        self.s: E = None
        self.u: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: E = None
        self.p: I = None
        self.s: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: C = None
        self.o: E = None
        self.y: C = None
        self.t: D = None
        self.z: G = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: G = None
        self.r: E = None
        self.o: E = None
        self.p: E = None
        self.w: F = None
        self.q: F = None
        self.x: H = None
        self.s: E = None
        self.u: H = None
        self.txt = txt

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

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