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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.t: E = None
        self.w: C = None
        self.s: G = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: E = None
        self.w: A = None
        self.s: I = None
        self.o: F = None
        self.v: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: E = None
        self.t: E = None
        self.w: H = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: C = None
        self.o: H = None
        self.p: E = None
        self.y: J = None
        self.q: E = None
        self.t: B = None
        self.x: J = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.o: D = None
        self.q: F = None
        self.w: C = None
        self.p: A = None
        self.z: B = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: C = None
        self.t: E = None
        self.w: C = None
        self.s: G = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.y: E = None
        self.w: A = None
        self.s: I = None
        self.o: F = None
        self.v: F = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: E = None
        self.t: E = None
        self.w: H = None
        self.q: C = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: G = None
        self.u: C = None
        self.o: H = None
        self.p: E = None
        self.y: J = None
        self.q: E = None
        self.t: B = None
        self.x: J = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: H = None
        self.o: D = None
        self.q: F = None
        self.w: C = None
        self.p: A = None
        self.z: B = None
        self.x: C = None
        self.txt = txt

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

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