class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: B = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.r: A = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: C = None
        self.u: G = None
        self.v: H = None
        self.t: C = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: H = None
        self.v: E = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: I = None
        self.r: C = None
        self.y: J = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: H = None
        self.r: A = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: C = None
        self.u: G = None
        self.v: H = None
        self.t: C = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: H = None
        self.v: E = None
        self.z: F = None
        self.y: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: I = None
        self.r: C = None
        self.y: J = None
        self.o: D = None
        self.u: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: C = None
        self.txt = txt

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

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