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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: D = None
        self.w: G = None
        self.p: D = None
        self.q: I = None
        self.s: H = None
        self.x: D = None
        self.o: G = None
        self.v: H = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.t: E = None
        self.w: C = None
        self.u: I = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: C = None
        self.t: E = None
        self.o: J = None
        self.w: F = None
        self.x: C = None
        self.v: I = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: G = None
        self.s: D = None
        self.v: H = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: F = None
        self.z: I = None
        self.r: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.y: D = None
        self.w: G = None
        self.p: D = None
        self.q: I = None
        self.s: H = None
        self.x: D = None
        self.o: G = None
        self.v: H = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.t: E = None
        self.w: C = None
        self.u: I = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: C = None
        self.t: E = None
        self.o: J = None
        self.w: F = None
        self.x: C = None
        self.v: I = None
        self.u: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: G = None
        self.s: D = None
        self.v: H = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: F = None
        self.z: I = None
        self.r: D = None
        self.txt = txt

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

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