class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.u: B = None
        self.w: F = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: F = None
        self.s: H = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: D = None
        self.x: A = None
        self.s: A = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: B = None
        self.q: A = None
        self.w: F = None
        self.txt = txt

n = A("n")
f = B("f")
e = C("e")
k = D("k")
g = E("g")
h = F("h")
i = G("i")
j = H("j")
a = I("a")
l = B("l")

n.s = f
n.u = f
n.x = g
n.w = h
n.r = l
f.q = l
f.r = h
f.s = j
f.w = e
e.r = i
e.y = i
e.q = k
e.x = n
e.s = n
e.t = n
k.s = e
k.p = f
g.u = k
h.x = a
h.t = k
h.p = e
i.u = f
j.w = i
j.u = l
a.o = k
a.u = l
a.q = n
a.w = h
l.q = f
l.r = h
l.s = j
l.w = e
assert e.t.w.x.w.t.s.q.p.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: E = None
        self.u: B = None
        self.w: F = None
        self.r: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: F = None
        self.s: H = None
        self.w: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: D = None
        self.x: A = None
        self.s: A = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: D = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: B = None
        self.q: A = None
        self.w: F = None
        self.txt = txt

n = A("n")
f = B("f")
e = C("e")
k = D("k")
g = E("g")
h = F("h")
i = G("i")
j = H("j")
a = I("a")
l = B("l")

n.s = f
n.u = f
n.x = g
n.w = h
n.r = l
f.q = l
f.r = h
f.s = j
f.w = e
e.r = i
e.y = i
e.q = k
e.x = n
e.s = n
e.t = n
k.s = e
k.p = f
g.u = k
h.x = a
h.t = k
h.p = e
i.u = f
j.w = i
j.u = l
a.o = k
a.u = l
a.q = n
a.w = h
l.q = f
l.r = h
l.s = j
l.w = e
assert e.t.w.x.w.t.s.q.p.txt == "f"