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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: D = None
        self.s: F = None
        self.v: B = None
        self.u: G = None
        self.w: D = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: D = None
        self.s: F = None
        self.v: B = None
        self.u: G = None
        self.w: D = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

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

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