class A:
    def __init__(self, txt: str):
        self.s: H = None
        self.z: C = None
        self.t: G = None
        self.x: H = None
        self.u: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: F = None
        self.u: G = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: C = None
        self.v: A = None
        self.z: I = None
        self.r: G = None
        self.x: G = None
        self.t: A = None
        self.p: J = None
        self.u: B = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: F = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: F = None
        self.u: G = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: C = None
        self.v: A = None
        self.z: I = None
        self.r: G = None
        self.x: G = None
        self.t: A = None
        self.p: J = None
        self.u: B = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: J = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: F = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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