class A:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: H = None
        self.o: E = None
        self.t: F = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: H = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.v: B = None
        self.q: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: H = None
        self.q: F = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.v: B = None
        self.q: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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